Re: [PATCH] fix cirrus-ci builds by installing "pcre" package

2021-04-15 Thread Willy Tarreau
On Wed, Apr 14, 2021 at 07:16:25PM +0200, Tim Düsterhus wrote: > Willy, > > On 4/14/21 7:00 PM, ??? wrote: > > something changed in freebsd packaging. we now need to install pcre > > directly. > > This one looks good to me. Applied, thanks! Willy

Re: [PATCH] MINOR: sample: add json_string

2021-04-15 Thread Willy Tarreau
On Wed, Apr 14, 2021 at 09:52:31PM +0200, Aleksandar Lazic wrote: > > > +   - string  : This is the default search type and returns a String; > > > +   - boolean : If the JSON value is not a String or a Number > > > +   - number  : When the JSON value is a Number then will the value be > > > + 

Re: Is it possible: HTTP frontend connecting HTTPS endpoint using Client Certificate Authentication behind Squid

2021-04-15 Thread Willy Tarreau
On Thu, Apr 15, 2021 at 09:02:18AM +0200, Ferry Bodijn wrote: > L.S. > > Is it possible with HAProxy, to have a frontend which binds on HTTP that > refers to a backend that connects to an HTTPS endpoint using Client > Certificate Authentication while reaching it via a Squid forwarding proxy? If

Re: Still 100% CPU usage in 2.3.9 & 2.2.13 (Was: Re: [2.2.9] 100% CPU usage)

2021-04-15 Thread Robin H. Johnson
On Thu, Apr 15, 2021 at 08:59:35AM +0200, Willy Tarreau wrote: > On Wed, Apr 14, 2021 at 01:53:06PM +0200, Christopher Faulet wrote: > > > nbthread=64, nbproc=1 on both 1.8/2.x > > > > It is thus surprising, if it is really a contention issue, that you never > > observed slow down on the 1.8.

Re: Still 100% CPU usage in 2.3.9 & 2.2.13 (Was: Re: [2.2.9] 100% CPU usage)

2021-04-15 Thread Willy Tarreau
On Wed, Apr 14, 2021 at 01:53:06PM +0200, Christopher Faulet wrote: > > nbthread=64, nbproc=1 on both 1.8/2.x > > It is thus surprising, if it is really a contention issue, that you never > observed slow down on the 1.8. There is no watchdog, but the thread > implementation is a bit awkward on

Is it possible: HTTP frontend connecting HTTPS endpoint using Client Certificate Authentication behind Squid

2021-04-15 Thread Ferry Bodijn
L.S. Is it possible with HAProxy, to have a frontend which binds on HTTP that refers to a backend that connects to an HTTPS endpoint using Client Certificate Authentication while reaching it via a Squid forwarding proxy? I have a working Apache HTTP server config which I want to replace because

changed IP messages overrunning /var/log ?

2021-04-15 Thread Jim Freeman
Migrating from stock stretch-backports+1.8 to Debian_10/Buster+2.0 (to purge 'reqrep' en route to 2.2), /var/log/ is suddenly filling disk with messages about changed IPs : === 2021-04-14T01:08:40.123303+00:00 ip-10-36-217-169 haproxy[569]: my_web_service changed its IP from 52.208.198.117 to

Re: changed IP messages overrunning /var/log ?

2021-04-15 Thread Jarno Huuskonen
Hello, On Thu, 2021-04-15 at 01:43 -0600, Jim Freeman wrote: > This is puzzling, since haproxy.cfg directs all logs to local* > After some investigation, it turns out that the daemon.log and syslog > entries arrive via facility.level=daemon.info.  I've made rsyslog cfg > changes that now stop the

Re: Still 100% CPU usage in 2.3.9 & 2.2.13 (Was: Re: [2.2.9] 100% CPU usage)

2021-04-15 Thread Willy Tarreau
On Thu, Apr 15, 2021 at 07:13:53AM +, Robin H. Johnson wrote: > Thanks; I will need to catch it faster or automate this, because the > watchdog does a MUCH better job restarting it than before, less than 30 > seconds of 100% CPU before the watchdog reliably kills it. I see. Then collecting

Re: [OT PATCH 0/2] opentracing: use of the context name without prefix

2021-04-15 Thread Willy Tarreau
On Wed, Apr 14, 2021 at 12:56:39PM +0200, Miroslav Zagorac wrote: > Hello all, > > the next two patches allow you to transfer the OpenTracing context via an > HTTP headers without using a name prefix. > > This is very useful when transferring context from or to some other process > that cannot

Re: Memory allocation for haproxy

2021-04-15 Thread Willy Tarreau
Hi Robert, On Wed, Apr 14, 2021 at 12:18:42PM +0200, Robert Ionescu wrote: > Hi all, > > I am working on a new patch for haproxy and would need the malloc method > used to allocate memory for structs like the connection struct in > connection-t.c > In case I want to expand the struct with a new

Re: [OT PATCH 0/2] opentracing: use of the context name without prefix

2021-04-15 Thread Andrea Bonini
Great work, i testet it right now and work like a charm! Thank u Zaga, good work! Il giorno gio 15 apr 2021 alle ore 08:40 Willy Tarreau ha scritto: > On Wed, Apr 14, 2021 at 12:56:39PM +0200, Miroslav Zagorac wrote: > > Hello all, > > > > the next two patches allow you to transfer the

Re: [PATCH] MINOR: sample: add json_string

2021-04-15 Thread Aleksandar Lazic
On 15.04.21 09:08, Willy Tarreau wrote: On Wed, Apr 14, 2021 at 09:52:31PM +0200, Aleksandar Lazic wrote: +   - string  : This is the default search type and returns a String; +   - boolean : If the JSON value is not a String or a Number +   - number  : When the JSON value is a Number then will

Re: [PATCH] MINOR: sample: add json_string

2021-04-15 Thread Aleksandar Lazic
On 15.04.21 17:09, Willy Tarreau wrote: On Thu, Apr 15, 2021 at 04:49:00PM +0200, Aleksandar Lazic wrote: #define JSON_INT_MAX ((1ULL << 53) - 1) ^ Sorry I was not clear, please drop that 'U' here. I'm also sorry, I was in a tunnel :-/ Attached now the next

Re: [PATCH] MINOR: sample: add json_string

2021-04-15 Thread Willy Tarreau
On Thu, Apr 15, 2021 at 04:49:00PM +0200, Aleksandar Lazic wrote: > > > #define JSON_INT_MAX ((1ULL << 53) - 1) > >^ > > Sorry I was not clear, please drop that 'U' here. > > I'm also sorry, I was in a tunnel :-/ > > Attached now the next patches. Thank you! Now

Re: [PATCH] CI: travis-ci: enable graviton2 builds

2021-04-15 Thread Willy Tarreau
On Thu, Apr 15, 2021 at 07:19:25PM +0500, ??? wrote: > Hello, > > as described in travis-ci docs: > https://blog.travis-ci.com/2020-09-11-arm-on-aws > > it is next generation armv8 available on AWS. Applied, thanks Ilya! Willy

Re: [PATCH] MINOR: sample: add json_string

2021-04-15 Thread Tim Düsterhus
Willy, On 4/15/21 5:09 PM, Willy Tarreau wrote: On Thu, Apr 15, 2021 at 04:49:00PM +0200, Aleksandar Lazic wrote: #define JSON_INT_MAX ((1ULL << 53) - 1) ^ Sorry I was not clear, please drop that 'U' here. I'm also sorry, I was in a tunnel :-/ Attached now the

Re: [PATCH] MINOR: sample: add json_string

2021-04-15 Thread Willy Tarreau
On Thu, Apr 15, 2021 at 02:17:45PM +0200, Aleksandar Lazic wrote: > > I, by far, prefer Tim's proposal here, as I do not even understand the > > first one, sorry Aleks, please don't feel offended :-) > > Well you know my focus is to support HAProxy and therefore it's okay. > The contribution was

Re: [PATCH] MINOR: sample: add json_string

2021-04-15 Thread Aleksandar Lazic
On 15.04.21 14:48, Willy Tarreau wrote: On Thu, Apr 15, 2021 at 02:17:45PM +0200, Aleksandar Lazic wrote: I, by far, prefer Tim's proposal here, as I do not even understand the first one, sorry Aleks, please don't feel offended :-) Well you know my focus is to support HAProxy and therefore

Re: [PATCH] MINOR: sample: add json_string

2021-04-15 Thread Willy Tarreau
On Thu, Apr 15, 2021 at 03:41:18PM +0200, Aleksandar Lazic wrote: > > > Now when I remove the check "smp->data.u.sint < 0" every positive value is > > > bigger then JSON INT_MIN and returns 0. > > > > But don't you agree that this test DOES nothing ? If it changes anything > > it means the issue

Opentracing span name from variable

2021-04-15 Thread Andrea Bonini
Hi all, is it possible to use a variable as span name? for example, can i use uri as span name so in zipkin it's visible as service: Thanks -- Bonini Andrea

Re: Opentracing span name from variable

2021-04-15 Thread Miroslav Zagorac
On 04/15/2021 04:24 PM, Andrea Bonini wrote: Hi all, is it possible to use a variable as span name? for example, can i use uri as span name so in zipkin it's visible as service: Thanks Hello Andrea, the name of the span is defined statically and cannot be the content of a variable.

Re: [PATCH] MINOR: sample: add json_string

2021-04-15 Thread Aleksandar Lazic
On 15.04.21 15:55, Willy Tarreau wrote: On Thu, Apr 15, 2021 at 03:41:18PM +0200, Aleksandar Lazic wrote: Now when I remove the check "smp->data.u.sint < 0" every positive value is bigger then JSON INT_MIN and returns 0. But don't you agree that this test DOES nothing ? If it changes anything

[PATCH] CI: travis-ci: enable graviton2 builds

2021-04-15 Thread Илья Шипицин
Hello, as described in travis-ci docs: https://blog.travis-ci.com/2020-09-11-arm-on-aws it is next generation armv8 available on AWS. cheers, Ilya From 4365c936396a5c7c4f710ed8267b06a73fd5bbcc Mon Sep 17 00:00:00 2001 From: Ilya Shipitsin Date: Thu, 15 Apr 2021 19:16:09 +0500 Subject: [PATCH]

Re: [PATCH] MINOR: sample: add json_string

2021-04-15 Thread Aleksandar Lazic
On 15.04.21 16:09, Willy Tarreau wrote: On Thu, Apr 15, 2021 at 04:05:27PM +0200, Aleksandar Lazic wrote: Well I don't think so because 4 is still bigger then -9007199254740991 ;-) This is because *you* think it is -9007199254740991 but the reality is that it's not this.due to ULL:

Re: [PATCH] MINOR: sample: add json_string

2021-04-15 Thread Willy Tarreau
On Thu, Apr 15, 2021 at 04:05:27PM +0200, Aleksandar Lazic wrote: > Well I don't think so because 4 is still bigger then -9007199254740991 ;-) This is because *you* think it is -9007199254740991 but the reality is that it's not this.due to ULL: #define JSON_INT_MAX ((1ULL << 53) - 1) #define

Re: Still 100% CPU usage in 2.3.9 & 2.2.13 (Was: Re: [2.2.9] 100% CPU usage)

2021-04-15 Thread Robin H. Johnson
On Thu, Apr 15, 2021 at 09:23:07AM +0200, Willy Tarreau wrote: > On Thu, Apr 15, 2021 at 07:13:53AM +, Robin H. Johnson wrote: > > Thanks; I will need to catch it faster or automate this, because the > > watchdog does a MUCH better job restarting it than before, less than 30 > > seconds of

[PATCH v2 1/8] MINOR: uri_normalizer: Add uri_normalizer module

2021-04-15 Thread Tim Duesterhus
Christopher, this one should be unchanged. I just fixed the conflict with Aleks' JSON patch. Best regards Tim Düsterhus Apply with `git am --scissors` to automatically cut the commit message. -- >8 -- This is in preparation for future patches. --- Makefile | 2 +-

[PATCH v2 3/8] MINOR: uri_normalizer: Add `http-request normalize-uri`

2021-04-15 Thread Tim Duesterhus
Christopher, this one is completely new. It cleanly separates the patches for adding the action from the patches adding the normalizers. Best regards Tim Düsterhus Apply with `git am --scissors` to automatically cut the commit message. -- >8 -- This patch adds the `http-request normalize-uri`

[PATCH v2 4/8] MINOR: uri_normalizer: Add a `merge-slashes` normalizer to http-request normalize-uri

2021-04-15 Thread Tim Duesterhus
Christopher, the general logic of the normalizer is unchanged, but the whole framework was refactored. Best regards Tim Düsterhus Apply with `git am --scissors` to automatically cut the commit message. -- >8 -- This normalizer merges adjacent slashes into a single slash, thus removing empty

[PATCH v2 2/8] MINOR: uri_normalizer: Add `enum uri_normalizer_err`

2021-04-15 Thread Tim Duesterhus
Christopher, in this one I cleaned up the values of the enum. Best regards Tim Düsterhus Apply with `git am --scissors` to automatically cut the commit message. -- >8 -- This enum will serve as the return type for each normalizer. --- include/haproxy/uri_normalizer-t.h | 31

[PATCH v2 5/8] MINOR: uri_normalizer: Add a `dotdot` normalizer to http-request normalize-uri

2021-04-15 Thread Tim Duesterhus
Christopher, the general logic of the normalizer is unchanged, but the whole framework was refactored. Best regards Tim Düsterhus Apply with `git am --scissors` to automatically cut the commit message. -- >8 -- This normalizer merges `../` path segments with the predecing segment, removing

[PATCH v2 8/8] MINOR: uri_normalizer: Add a `percent-upper` normalizer

2021-04-15 Thread Tim Duesterhus
Christopher, the general logic of the normalizer is unchanged, but the whole framework was refactored. Best regards Tim Düsterhus Apply with `git am --scissors` to automatically cut the commit message. -- >8 -- This normalizer uppercases the hexadecimal characters used in percent-encoding.

[PATCH v2 7/8] MINOR: uri_normalizer: Add a `sort-query` normalizer

2021-04-15 Thread Tim Duesterhus
Christopher, here I am using `istdiff` and a trash buffer instead of dynamic allocation. Best regards Tim Düsterhus Apply with `git am --scissors` to automatically cut the commit message. -- >8 -- This normalizer sorts the `&` delimited query parameters by parameter name. See GitHub Issue

[PATCH v2 0/8] URI normalization / Issue #714

2021-04-15 Thread Tim Duesterhus
Christopher, again: Thank you for the very helpful review. In this series you can find v2 of my URI normalization patches. I hope I did not forget to incorporate any of your feedback. Some general notes: - I completely cleaned up the commit history to group similar patches (e.g. the two

[PATCH v2 6/8] MINOR: uri_normalizer: Add support for supressing leading `../` for dotdot normalizer

2021-04-15 Thread Tim Duesterhus
Christopher, the general logic of the normalizer is unchanged, but the whole framework was refactored. Best regards Tim Düsterhus Apply with `git am --scissors` to automatically cut the commit message. -- >8 -- This adds an option to supress `../` at the start of the resulting path. ---

Re: changed IP messages overrunning /var/log ?

2021-04-15 Thread Jim Freeman
Yes - as a systemd service. But the puzzlement remains that the same complaints get logged via *both* daemon.info and local*.info, when local* is all we configure in haproxy.cfg. /var/log gets doubly over-taxed because the daemon.info entries wind up in both syslog and daemon.log (per stock

Re: Still 100% CPU usage in 2.3.9 & 2.2.13 (Was: Re: [2.2.9] 100% CPU usage)

2021-04-15 Thread Robin H. Johnson
On Thu, Apr 15, 2021 at 07:53:15PM +, Robin H. Johnson wrote: > But your thought of CPU pinning was good. > I went to confirm it in the host, and I'm not certain if the cpu-map is > working > right. Ignore me, long day and I didn't think to check each thread PID: # ps -e -T | grep haproxy -w

Re: changed IP messages overrunning /var/log ?

2021-04-15 Thread Jim Freeman
More info on the over-quick+newly-noisy resolves that were triggering this ... We've been running 1.8.19 (https://packages.debian.org/stretch-backports/haproxy) with 'hold valid 60s' configured, which was acting-ish like 'timeout resolve 60s' (which was *not* configured). So when we moved to