Re: agent-check requires newline in response?

2018-12-15 Thread Willy Tarreau
On Sat, Dec 15, 2018 at 11:14:22PM +, Nick Ramirez wrote: > Yep, your suggestion reads better to me. Great, thanks. I've moved it into the previous sentence as it didn't integrate well within the existing one, which was not finished : - to the port set by the "agent-port" parameter and

[PATCH 3/3] MEDIUM: lua: expose safe fetch/conv via val_args_flags

2018-12-15 Thread Robin H. Johnson
Any val_args functions with side-effects is unsafe for use in the Lua context, and previously this stopped them from having object methods created except where explicitly whitelisted (val_payload_lv, val_hdr). Using the new val_args_flags field, we can track which sample fetches/converters are

[PATCH 1/3] MINOR: samples: Prep for val_args_flags

2018-12-15 Thread Robin H. Johnson
In preparation for val_args_flags, introduce a macro that is used to populate the val_args field in sample_conv_kw_list and sample_fetch_kw_list. This commit produces code that has zero changes after preprocessor expansion. All sample registration can be found with: $ git grep -n -e

[PATCH 2/3] MEDIUM: samples: add val_args_flags

2018-12-15 Thread Robin H. Johnson
Some argument validation (val_args) functions have unsafe side-effects, introduce val_args_flags field to track which functions have side-effects. Keep the actual values in preprocessor symbols so that they can be kept with the functions, and consumed via macros in the static lists.

Re[2]: agent-check requires newline in response?

2018-12-15 Thread Nick Ramirez
Yep, your suggestion reads better to me. -- Original Message -- From: "Willy Tarreau" To: "Nick Ramirez" Cc: haproxy@formilux.org Sent: 12/15/2018 10:30:58 AM Subject: Re: agent-check requires newline in response? Hi Nick, On Fri, Dec 14, 2018 at 05:43:49PM +, Nick Ramirez

Re: HTTP/2 to backend server fails health check when 'option httpchk' set

2018-12-15 Thread Willy Tarreau
On Sat, Dec 15, 2018 at 11:11:58PM +, Nick Ramirez wrote: > Thanks! That points me in the right direction. I found that to enable Layer > 7 health checks in this case, I would open another port on the web server > that does not advertise HTTP/2 support (ALPN HTTP/1.1) or does not use TLS >

Re[2]: HTTP/2 to backend server fails health check when 'option httpchk' set

2018-12-15 Thread Nick Ramirez
Thanks! That points me in the right direction. I found that to enable Layer 7 health checks in this case, I would open another port on the web server that does not advertise HTTP/2 support (ALPN HTTP/1.1) or does not use TLS (which also turns off HTTP/2 in the case of the Caddy web server),

Re: [PATCHv2] ssl: Fix compilation without deprecated OpenSSL 1.1 APIs

2018-12-15 Thread Rosen Penev
On Sat, Dec 15, 2018 at 7:57 AM Willy Tarreau wrote: > > On Fri, Dec 14, 2018 at 08:47:02AM -0800, Rosen Penev wrote: > > Removing deprecated APIs is an optional part of OpenWrt's build system to > > save some space on embedded devices. > > > > Also added compatibility for LibreSSL. > > Looks

Setting a unique header per server in a backend

2018-12-15 Thread Sachin Shetty
Hi, We have a tricky requirement to set a different header value in the request based on which server in a backend is picked. backend pod0 ... server server1 server1:6180 check server server2 server2:6180 check server server3 server3:6180 check so when request is forwarded to

Re: regtests - with option http-use-htx

2018-12-15 Thread Willy Tarreau
On Sat, Dec 15, 2018 at 05:18:08PM +0100, PiBa-NL wrote: > > > h1    0.0 CLI recv|0x8026612c0: key=127.0.0.1 use=1 exp=0 gpt0=0 > > > gpc0=0 > > > gpc0_rate(1)=0 conn_rate(1)=1 http_req_cnt=1 > > > http_req_rate(1)=1 > > > http_err_cnt=0 http_err_rate(1)=0 > > > h1   

Re: regtests - with option http-use-htx

2018-12-15 Thread PiBa-NL
Hi Willy, Op 15-12-2018 om 17:06 schreef Willy Tarreau: Hi Pieter, On Sat, Dec 15, 2018 at 04:52:10PM +0100, PiBa-NL wrote: Hi List, Willy, Trying to run some existing regtests with added option: option http-use-htx Using: HA-Proxy version 1.9-dev10-c11ec4a 2018/12/15 I get the below issues

Re: Random with Two Choices Load Balancing Algorithm

2018-12-15 Thread Willy Tarreau
Hi Norman, On Thu, Dec 06, 2018 at 04:57:18PM +, Norman Branitsky wrote: > NGINX just announced the following load balancing method as default for their > Ingress Controller for Kubernetes. > Will this appear on the HAProxy roadmap? That's interesting because we've had a discussion about

Re: regtests - with option http-use-htx

2018-12-15 Thread Willy Tarreau
Hi Pieter, On Sat, Dec 15, 2018 at 04:52:10PM +0100, PiBa-NL wrote: > Hi List, Willy, > > Trying to run some existing regtests with added option: option http-use-htx > > Using: HA-Proxy version 1.9-dev10-c11ec4a 2018/12/15 > > I get the below issues sofar: > > based on

Re: [PATCHv2] ssl: Fix compilation without deprecated OpenSSL 1.1 APIs

2018-12-15 Thread Willy Tarreau
On Fri, Dec 14, 2018 at 08:47:02AM -0800, Rosen Penev wrote: > Removing deprecated APIs is an optional part of OpenWrt's build system to > save some space on embedded devices. > > Also added compatibility for LibreSSL. Looks good, now applied. Thanks for the explanation by the way. Willy

regtests - with option http-use-htx

2018-12-15 Thread PiBa-NL
Hi List, Willy, Trying to run some existing regtests with added option: option http-use-htx Using: HA-Proxy version 1.9-dev10-c11ec4a 2018/12/15 I get the below issues sofar: based on /reg-tests/connection/b0.vtc Takes 8 seconds to pass, in a slightly modified manor 1.1 > 2.0

Re: agent-check requires newline in response?

2018-12-15 Thread Willy Tarreau
Hi Nick, On Fri, Dec 14, 2018 at 05:43:49PM +, Nick Ramirez wrote: > In the documentation for agent-check > (https://cbonte.github.io/haproxy-dconv/1.9/configuration.html#agent-check) > it says that the string returned by the agent may be optionally terminated > by '\r' or '\n'. However, in

Re: HTTP/2 to backend server fails health check when 'option httpchk' set

2018-12-15 Thread Willy Tarreau
Hi Nick, On Fri, Dec 14, 2018 at 10:43:04PM +, Nick Ramirez wrote: > This may be something very simple that I am missing. I am using the latest > HAProxy Docker image, which is using HAProxy 1.9-dev10 2018/12/08. It is > using HTTP/2 to the backend web server (Caddy). > > It fails its health

Re: [PATCH 1/1] REGTEST: Add a reg test for HTTP cookies.

2018-12-15 Thread Willy Tarreau
On Fri, Dec 14, 2018 at 08:07:57PM +0100, flecai...@haproxy.com wrote: > From: Frédéric Lécaille > > This script tests the "cookie insert indirect" directive with > header checks on server and client side. syslog messages are also > checked, especially --II (invalid, insert) flags logging.

Re: [PATCH] BUG/MEDIUM: Expose all converters & fetches

2018-12-15 Thread Willy Tarreau
Hi Robin, On Fri, Dec 14, 2018 at 06:28:16AM +, Robin H. Johnson wrote: > On Fri, Dec 07, 2018 at 01:14:47PM +0100, Willy Tarreau wrote: > > I had a quick look, some converters use check_operator() which creates > > a variable upon each invocation of the parsing function. Some people > >

Re: stdout logging makes syslog logging fail.. 1.9-dev10-6e0d8ae

2018-12-15 Thread Willy Tarreau
On Sat, Dec 15, 2018 at 12:40:08AM +0100, PiBa-NL wrote: > Hi List, Willy, > > stdout logging makes syslog logging fail.. regtest that reproduces the issue > attached. Now fixed, thanks Pieter. I was confused by the way the initialized state of the log FDs is detected there, so this only works

Re: crash with regtest: /reg-tests/connection/h00001.vtc after commit f157384

2018-12-15 Thread Willy Tarreau
On Sat, Dec 15, 2018 at 12:32:28AM +0100, PiBa-NL wrote: > Hi List, Willy, > > Current 1.9-dev master ( 6e0d8ae ) crashes with regtest: > /reg-tests/connection/h1.vtc stack below, it fails after commit f157384. > > Can someone check? Thanks. Now fixed, thank you Pieter. I don't know how I

Re: Quick update on 1.9

2018-12-15 Thread Willy Tarreau
On Sat, Dec 15, 2018 at 01:18:18PM +0100, PiBa-NL wrote: > Hi Willy, > > Op 15-12-2018 om 6:15 schreef Willy Tarreau: > > > - Compression corrupts data(Christopher is investigating): > > > https://www.mail-archive.com/haproxy@formilux.org/msg32059.html > > This one was fixed, he had to leave

Re: Quick update on 1.9

2018-12-15 Thread PiBa-NL
Hi Willy, Op 15-12-2018 om 6:15 schreef Willy Tarreau: - Compression corrupts data(Christopher is investigating): https://www.mail-archive.com/haproxy@formilux.org/msg32059.html This one was fixed, he had to leave quickly last evening so he couldn't respond, but it was due to some of my