Re: [PATCH] MINOR: promex: backend aggregated server check status

2021-11-08 Thread Willy Tarreau
On Mon, Nov 08, 2021 at 02:31:32PM +0100, William Dauchy wrote: > On Mon, Nov 8, 2021 at 1:52 PM Willy Tarreau wrote: > > Just to be sure, is this something you want to merge into 2.5 or is it > > to be queued next ? I'm fine with both, but I prefer to ask as it's not > > just a one-liner and I

Re: [PATCH] MINOR: promex: backend aggregated server check status

2021-11-08 Thread William Dauchy
On Mon, Nov 8, 2021 at 1:52 PM Willy Tarreau wrote: > Just to be sure, is this something you want to merge into 2.5 or is it > to be queued next ? I'm fine with both, but I prefer to ask as it's not > just a one-liner and I don't know the impact on promex. I know Christopher was possibly

Re: [ANNOUNCE] haproxy-2.2.18

2021-11-08 Thread Jim Freeman
Great to hear - thanks ! On Sat, Nov 6, 2021 at 12:58 AM Vincent Bernat wrote: > ❦ 5 November 2021 17:05 -06, Jim Freeman: > > > Might this (or something 2.4-ish) be heading towards bullseye-backports ? > > https://packages.debian.org/search?keywords=haproxy > >

Re: [PATCH] MINOR: promex: backend aggregated server check status

2021-11-08 Thread Willy Tarreau
Hi William, On Sun, Nov 07, 2021 at 10:18:47AM +0100, William Dauchy wrote: > - add new metric: `haproxy_backend_agg_server_check_status` > it counts the number of servers matching a specific check status > this permits to exclude per server check status as the usage is often > to rely on

Re: [PATCH] DOC: stats: fix location of the text representation

2021-11-08 Thread Willy Tarreau
On Sat, Nov 06, 2021 at 12:30:43PM +0100, William Dauchy wrote: > `info_field_names` and `stat_field_names` no longer exist and have been > moved in stats.c > To avoid changing this comment, just mention the name of the new table > `info_fields` and `stat_fields` Merged, thanks William. Willy

Re: [PATCH 0/6] Probably final Coccinelle Cleanup

2021-11-08 Thread Willy Tarreau
On Mon, Nov 08, 2021 at 12:53:00PM +0100, Tim Düsterhus wrote: > Willy, > > On 11/8/21 11:43 AM, Willy Tarreau wrote: > > > You're totally right. Not only it is redundant, but it is wrong (which > > > is why it is redundant). By being called strncat() one would hope that > > > it never copies

Re: [PATCH 0/6] Probably final Coccinelle Cleanup

2021-11-08 Thread Tim Düsterhus
Willy, On 11/8/21 11:43 AM, Willy Tarreau wrote: You're totally right. Not only it is redundant, but it is wrong (which is why it is redundant). By being called strncat() one would hope that it never copies more than the source, but here it ignores the source's size and always takes the len

Limit requests with peers on 2 independent HAProxies to one backend

2021-11-08 Thread Aleksandar Lazic
Hi. I have 2 LB's which should limit the connection to one backend. I would try to use "conn_cur" in a stick table and share it via peers. Have anyone such a solution already in place? That's my assuption for the config. ``` peers be_pixel_peers bind 9123 log global localpeer {{

Re: [PATCH 0/6] Probably final Coccinelle Cleanup

2021-11-08 Thread Willy Tarreau
On Mon, Nov 08, 2021 at 11:41:52AM +0100, Willy Tarreau wrote: > Hi Tim, > > On Mon, Nov 08, 2021 at 09:04:59AM +0100, Tim Duesterhus wrote: > > Hi Willy, > > > > find my (probably :-) ) final CLEANUP series for 2.5. > > > > Regarding the final patch: > > > > 'chunk_strncat()' appears to be

Re: [PATCH 0/6] Probably final Coccinelle Cleanup

2021-11-08 Thread Willy Tarreau
Hi Tim, On Mon, Nov 08, 2021 at 09:04:59AM +0100, Tim Duesterhus wrote: > Hi Willy, > > find my (probably :-) ) final CLEANUP series for 2.5. > > Regarding the final patch: > > 'chunk_strncat()' appears to be completely redundant, it simply passes through > the arguments and even takes an int

[PATCH 5/6] CLEANUP: Apply ist.cocci

2021-11-08 Thread Tim Duesterhus
This is to make use of `chunk_istcat()`. --- src/cache.c | 2 +- src/http_fetch.c | 2 +- src/http_htx.c | 4 ++-- src/mux_fcgi.c | 10 +- src/tcpcheck.c | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/cache.c b/src/cache.c index

[PATCH 6/6] CLEANUP: chunk: Remove duplicated chunk_Xcat implementation

2021-11-08 Thread Tim Duesterhus
Delegate chunk_istcat, chunk_cat and chunk_strncat to the most generic chunk_memcat. --- include/haproxy/chunk.h | 41 + 1 file changed, 13 insertions(+), 28 deletions(-) diff --git a/include/haproxy/chunk.h b/include/haproxy/chunk.h index

[PATCH 0/6] Probably final Coccinelle Cleanup

2021-11-08 Thread Tim Duesterhus
Hi Willy, find my (probably :-) ) final CLEANUP series for 2.5. Regarding the final patch: 'chunk_strncat()' appears to be completely redundant, it simply passes through the arguments and even takes an int instead of a size_t. Should it be removed? Best regards Tim Düsterhus Tim Duesterhus

[PATCH 1/6] DEV: coccinelle: Add rule to use `isttrim()` where possible

2021-11-08 Thread Tim Duesterhus
This replaces `if (i.len > e) i.len = e;` by `isttrim(i, e)`. --- dev/coccinelle/ist.cocci | 8 1 file changed, 8 insertions(+) diff --git a/dev/coccinelle/ist.cocci b/dev/coccinelle/ist.cocci index 5b6aa6b2c..7e9a6ac05 100644 --- a/dev/coccinelle/ist.cocci +++

[PATCH 3/6] DEV: coccinelle: Add rule to use `chunk_istcat()` instead of `chunk_memcat()`

2021-11-08 Thread Tim Duesterhus
This replaces `chunk_memcat()` with `chunk_istcat()` if the parameters are the ist's `.ptr` and `.len`. --- dev/coccinelle/ist.cocci | 8 1 file changed, 8 insertions(+) diff --git a/dev/coccinelle/ist.cocci b/dev/coccinelle/ist.cocci index 7e9a6ac05..4945141b2 100644 ---

[PATCH 2/6] CLEANUP: Apply ist.cocci

2021-11-08 Thread Tim Duesterhus
Make use of the new rules to use `isttrim()`. --- src/cache.c | 3 +-- src/flt_trace.c | 3 +-- src/hlua.c | 6 ++ src/http_ana.c | 3 +-- src/log.c | 6 ++ 5 files changed, 7 insertions(+), 14 deletions(-) diff --git a/src/cache.c b/src/cache.c index ba2b63c49..e871a7b30

[PATCH 4/6] DEV: coccinelle: Add rule to use `chunk_istcat()` instead of `chunk_strncat()`

2021-11-08 Thread Tim Duesterhus
This replaces `chunk_strncat()` with `chunk_istcat()` if the parameters are the ist's `.ptr` and `.len`. --- dev/coccinelle/ist.cocci | 8 1 file changed, 8 insertions(+) diff --git a/dev/coccinelle/ist.cocci b/dev/coccinelle/ist.cocci index 4945141b2..680afbade 100644 ---