Re: [PATCH 0/2] MEDIUM: stats: Add JSON output option to show (info|stat)

2017-03-13 Thread Simon Horman
Hi Willy, this patchset seems to have stalled. I'd like to find a way to revive it. On Sun, Jan 08, 2017 at 11:52:46AM +0100, Simon Horman wrote: > Hi Willy, > > On Sun, Jan 08, 2017 at 07:37:24AM +0100, Willy Tarreau wrote: > > Hi Simon, > > > > On Wed, Jan 04, 2017

Re: [PATCH 0/2] MEDIUM: stats: Add JSON output option to show (info|stat)

2017-01-12 Thread Simon Horman
uot;: "HAProxy" > } > }, > { > "field": { > "name": "Version", > "pos": 1 > }, > "processNum": 1, > "tags": { > "natu

Re: [PATCH 0/2] MEDIUM: stats: Add JSON output option to show (info|stat)

2017-01-12 Thread Simon Horman
On Thu, Jan 12, 2017 at 01:27:37PM +, Scott McKeown wrote: > Hi Simon, > > Output below: ... Thanks > On 12 January 2017 at 13:23, Simon Horman <si...@horms.net> wrote: > > > Hi Scott, > > > > could you send the output of the following? >

Re: [PATCH 0/2] MEDIUM: stats: Add JSON output option to show (info|stat)

2017-01-12 Thread Simon Horman
; 2 fall 3 minconn 0 maxconn 0s on-marked-down shutdown-sessions disabled > >> server RIP2_Name 127.0.0.1 weight 100 cookie RIP_Name > >> agent-check agent-port 12345 agent-inter 2000 check port 80 inter 2000 rise > >> 2 fall 3 minconn 0 maxconn 0s on-marked-down s

Re: [PATCH 0/2] MEDIUM: stats: Add JSON output option to show (info|stat)

2017-01-09 Thread Simon Horman
Hi Scott, thanks for testing. For reference the code I am using is here: https://github.com/horms/haproxy.git show-json And my minimal config file is as follows. Would it be possible for you to share you config with me (privately) ? global daemon stats socket /tmp/haproxy.stat

Re: [PATCH 0/2] MEDIUM: stats: Add JSON output option to show (info|stat)

2017-01-08 Thread Simon Horman
Hi Willy, On Sun, Jan 08, 2017 at 07:37:24AM +0100, Willy Tarreau wrote: > Hi Simon, > > On Wed, Jan 04, 2017 at 09:37:24AM +0100, Simon Horman wrote: > > Hi, > > > > this short series is an RFC implementation of adding JSON format > > output to show (info|stat

[PATCH 1/2] MEDIUM: stats: Add JSON output option to show (info|stat)

2017-01-04 Thread Simon Horman
t routines to only insert a "," between elements when needed. I would value any feedback on how this might be done better. Signed-off-by: Simon Horman <ho...@verge.net.au> --- For the simple configuration below a comparison of the size of info and stats output i

[PATCH 0/2] MEDIUM: stats: Add JSON output option to show (info|stat)

2017-01-04 Thread Simon Horman
in first patch * Possible automatic generation of (part) of schema in 2nd patch * Improved documentation Some discussion of the size of JSON output is included as an appendix to the changelog of the first patch. Changes since RFC noted in per-patch changelogs. Simon Horman (2): MEDIUM: stats: Add

[PATCH 2/2] MEDIUM: stats: Add show json schema

2017-01-04 Thread Simon Horman
chema.txt $ echo "show info json" | socat /var/run/haproxy.stat stdio > instance.txt python ./jschema.py $ echo "show stats json" | socat /var/run/haproxy.stat stdio > instance.txt python ./jschema.py Signed-off-by: Simon Horman <ho...@verge.net.au> --- In this case

Re: [PATCH/RFC 2/2] MEDIUM: stats: Add show json schema

2016-11-29 Thread Simon Horman
than > 2^64), it requires 23 years of traffic at 100 Gbps to have that high a > byte count instead of 46 years, so we have some margin. I agree this could be a sticky point. I believe the limits are left up to the implementation. But I'll do a bit of research and see if I can find a better number.

Re: [PATCH/RFC 0/2] MEDIUM: stats: Add JSON output option to show (info|stat)

2016-11-29 Thread Simon Horman
On Tue, Nov 29, 2016 at 08:01:53AM +0100, Willy Tarreau wrote: > Hi Simon, > > On Mon, Nov 28, 2016 at 04:18:52PM +0100, Simon Horman wrote: > > Hi, > > > > this short series is an RFC implementation of adding JSON format > > output to show (info|stat). It

[PATCH/RFC 1/2] MEDIUM: stats: Add JSON output option to show (info|stat)

2016-11-28 Thread Simon Horman
t routines to only insert a "," between elements when needed. I would value any feedback on how this might be done better. Signed-off-by: Simon Horman <ho...@verge.net.au> --- For the simple configuration below a comparison of the size of info and stats output i

[PATCH/RFC 2/2] MEDIUM: stats: Add show json schema

2016-11-28 Thread Simon Horman
$ echo "show info json" | socat /tmp/haproxy.stat stdio > instance.txt python ./jschema.py $ echo "show stats json" | socat /tmp/haproxy.stat stdio > instance.txt python ./jschema.py Signed-off-by: Simon Horman <ho...@verge.net.au> --- In this case the pretty pri

[PATCH/RFC 0/2] MEDIUM: stats: Add JSON output option to show (info|stat)

2016-11-28 Thread Simon Horman
in first patch * Possible automatic generation of (part) of schema in 2nd patch * Improved documentation Some discussion of the size of JSON output is included as an appendix to the changelog of the first patch. Simon Horman (2): MEDIUM: stats: Add JSON output option to show (info|stat) MEDIUM

[PATCH] MINOR: stats: correct documentation of process ID for typed output

2016-11-21 Thread Simon Horman
The process ID appears at the end of the first column rather than the line. --- doc/management.txt | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/doc/management.txt b/doc/management.txt index 751621c0392b..f42c0712012e 100644 --- a/doc/management.txt +++

Re: Getting JSON encoded data from the stats socket.

2016-11-14 Thread Simon Horman
On Mon, Nov 14, 2016 at 08:50:54AM -0500, hapr...@stormcloud9.net wrote: > Might help to see an example of what the results look like when using > this schema, however I do have one comment below. Yes, agreed. I plan to work on making that so. > On 2016/11/14 03:09, Simon Horman wrot

Re: Getting JSON encoded data from the stats socket.

2016-11-14 Thread Simon Horman
Hi Willy, On Mon, Nov 14, 2016 at 03:10:18PM +0100, Willy Tarreau wrote: > On Mon, Nov 14, 2016 at 11:34:18AM +0100, Simon Horman wrote: > > > Sometimes a description like above appears in your example, is it just > > > for a few fields or do you intend to describe all

Re: Getting JSON encoded data from the stats socket.

2016-11-14 Thread Simon Horman
Hi Willy, Hi All, On Thu, Nov 10, 2016 at 04:52:56PM +0100, Willy Tarreau wrote: > Hi Simon! > > On Thu, Nov 10, 2016 at 04:27:15PM +0100, Simon Horman wrote: > > My preference is to take things calmly as TBH I am only just getting > > started on this and I think the schem

Re: Getting JSON encoded data from the stats socket.

2016-11-10 Thread Simon Horman
On Thu, Nov 10, 2016 at 04:12:31PM +0100, Willy Tarreau wrote: > Hi Malcolm, > > On Thu, Nov 10, 2016 at 12:53:13PM +, Malcolm Turnbull wrote: > > Georg, > > > > That's a timely reminder thanks: > > I just had another chat with Simon Horman who has

Re: external-check stdout ends up in load-balanced traffic, destroying tcp sessions

2016-06-07 Thread Simon Horman
On Tue, Jun 07, 2016 at 08:18:21PM +0200, Willy Tarreau wrote: > On Tue, Jun 07, 2016 at 12:01:31PM +0200, Benoit Garnier wrote: > > You can always open /dev/null before chrooting and dup() it into FD 0 and 1 > > after chroot() has been called. > > I'd be more tempted to simply close those FDs

Re: external-check stdout ends up in load-balanced traffic, destroying tcp sessions

2016-06-06 Thread Simon Horman
Hi Cyril, Hi Lukas, On Mon, Jun 06, 2016 at 08:21:46PM +0200, Cyril Bonté wrote: > Hi Lukas, > > I add Malcolm and Simon to the thread. > > Le 06/06/2016 à 08:36, Lukas Erlacher a écrit : > >Additional info: The output only ends up in the *first* client connection. > > > >Talking about this

Re: [PATCH 1/4] mailer: increase default timeout to 10 seconds this allows the TCP connection to retry connecting when a packet is lost on the network

2016-02-16 Thread Simon Horman
Hi Pieter, Hi Willy, On Tue, Feb 16, 2016 at 10:11:34PM +0100, P.Baauw wrote: > Hi Willy, Simon, > > Op 16-2-2016 om 21:56 schreef Willy Tarreau: > >Simon, > > > >are you OK with this series from Pieter ? Yes, they look good to me. Thanks Pieter for the fixes/enh

Re: [PATCH] MEDIUM: mailer: try sending a mail up to 3 times

2015-11-20 Thread Simon Horman
On Fri, Nov 20, 2015 at 11:58:19PM +0100, PiBa-NL wrote: > Hi Willy, > > Op 16-11-2015 om 19:57 schreef Willy Tarreau: > >I agree with you since we don't know the timeout value nor what it applies > >to (connection or anything). Thus I think that we should first find and > >change that value, and

Re: [PATCH] MEDIUM: mailer: try sending a mail up to 3 times

2015-11-09 Thread Simon Horman
ng it might get merged to improve mailer reliability. So no > > 'server down' email gets lost.. > > Thanks everyone for your time :) . > > Looks good to me. Just waiting for Simon's approval. I would slightly prefer if there was a more substantial comment in process_email_alert() noting that retry occurs 3 times. But regardless: Acked-by: Simon Horman <ho...@verge.net.au>

Re: [PATCH 1/2] MEDIUM: Do not send email alerts corresponding to log-health-checks messages

2015-04-29 Thread Simon Horman
On Tue, Apr 28, 2015 at 09:24:42AM +0200, Willy Tarreau wrote: On Tue, Apr 28, 2015 at 02:25:02PM +0900, Simon Horman wrote: On Tue, Apr 28, 2015 at 06:43:38AM +0200, Willy Tarreau wrote: Hi Simon, On Tue, Apr 28, 2015 at 10:58:56AM +0900, Simon Horman wrote: This seems only

Re: [PATCH v2 0/3] MEDIUM: Change verbosity of email alerts

2015-04-29 Thread Simon Horman
On Thu, Apr 30, 2015 at 07:31:28AM +0200, Willy Tarreau wrote: Hi Simon, On Thu, Apr 30, 2015 at 01:10:32PM +0900, Simon Horman wrote: Hi, the aim of this series is to make the send more email alerts when they are likely to be useful and less when they are likely to be unwanted

[PATCH v2 0/3] MEDIUM: Change verbosity of email alerts

2015-04-29 Thread Simon Horman
sending them * Added documentation patch Simon Horman (3): MEDIUM: Lower priority of email alerts for log-health-checks messages MEDIUM: Send email alerts when servers are marked as UP or enter the drain state MEDIUM: Document when email-alerts are sent doc/configuration.txt | 9

[PATCH v2 3/3] MEDIUM: Document when email-alerts are sent

2015-04-29 Thread Simon Horman
Document the influence of email-alert level and other configuration parameters on when email-alerts are sent. Signed-off-by: Simon Horman ho...@verge.net.au --- doc/configuration.txt | 9 + 1 file changed, 9 insertions(+) diff --git a/doc/configuration.txt b/doc/configuration.txt index

[PATCH v2 2/3] MEDIUM: Send email alerts when servers are marked as UP or enter the drain state

2015-04-29 Thread Simon Horman
should be set to 'notice', 'info' or 'debug'. e.g: email-alert level notice email-alert mailers and email-alert to settings are also required in order for any email alerts to be sent. A follow-up patch will document the above. Signed-off-by: Simon Horman ho...@verge.net.au --- src/server.c | 2

[PATCH v2 1/3] MEDIUM: Lower priority of email alerts for log-health-checks messages

2015-04-29 Thread Simon Horman
state changes log-health-checks needs to be set and email-alert level needs to be 'info' or lower. email-alert mailers and email-alert to settings are also required in order for any email alerts to be sent. A follow-up patch will document the above. Signed-off-by: Simon Horman ho...@verge.net.au

[PATCH 0/2] MEDIUM: Change verbosity of email alerts

2015-04-27 Thread Simon Horman
Hi, the aim of this series is to make the send more email alerts when they are likely to be useful and less when they are likely to be unwanted. Simon Horman (2): MEDIUM: Do not send email alerts corresponding to log-health-checks messages MEDIUM: Send email alerts when servers

[PATCH 2/2] MEDIUM: Send email alerts when servers are marked as UP or enter the drain state

2015-04-27 Thread Simon Horman
should be set to 'notice', 'info' or 'debug'. e.g: email-alert level notice email-alert mailers and email-alert to settings are also required in order for any email alerts to be sent. Signed-off-by: Simon Horman ho...@verge.net.au --- src/server.c | 2 ++ 1 file changed, 2 insertions(+) diff --git

[PATCH 1/2] MEDIUM: Do not send email alerts corresponding to log-health-checks messages

2015-04-27 Thread Simon Horman
This seems only to lead to excessive verbosity which seems much more appropriate for logs than email. Signed-off-by: Simon Horman ho...@verge.net.au --- src/checks.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/checks.c b/src/checks.c index 3702d9a4b0fe..efcaff20219b 100644 --- a/src

Re: [PATCH 1/2] MEDIUM: Do not send email alerts corresponding to log-health-checks messages

2015-04-27 Thread Simon Horman
On Tue, Apr 28, 2015 at 06:43:38AM +0200, Willy Tarreau wrote: Hi Simon, On Tue, Apr 28, 2015 at 10:58:56AM +0900, Simon Horman wrote: This seems only to lead to excessive verbosity which seems much more appropriate for logs than email. Signed-off-by: Simon Horman ho...@verge.net.au

Re: [PATCH v2 0/4] MEDIUM: Enhancements to reporting of drain in stats

2015-04-23 Thread Simon Horman
On Thu, Apr 23, 2015 at 10:01:19AM +0200, Willy Tarreau wrote: Hi Simon, On Thu, Apr 23, 2015 at 02:51:25PM +0900, Simon Horman wrote: (...) This series attempts to address that problem by first disentangling the state and colour of servers in the first two patches, which are new

[PATCH v2 0/4] MEDIUM: Enhancements to reporting of drain in stats

2015-04-22 Thread Simon Horman
of the drain state, as described above. Patches have been lightly tested. Simon Horman (4): MEDIUM: Add enum srv_stats_state MEDIUM: Separate server state and colour in stats MEDIUM: Only report drain state in stats if server has SRV_ADMF_DRAIN set MEDIUM: Differentiate between DRAIN

[PATCH v2 1/4] MEDIUM: Add enum srv_stats_state

2015-04-22 Thread Simon Horman
not make any functional changes. Signed-off-by: Simon Horman ho...@verge.net.au --- v2 * First post --- src/dumpstats.c | 104 +++- 1 file changed, 57 insertions(+), 47 deletions(-) diff --git a/src/dumpstats.c b/src/dumpstats.c index

[PATCH v2 4/4] MEDIUM: Differentiate between DRAIN and DRAIN (agent)

2015-04-22 Thread Simon Horman
Differentiate between DRAIN and DRAIN (agent) when reporting stats. This is consistent with the distinction made between DOWN and DOWN (agent). Signed-off-by: Simon Horman ho...@verge.net.au --- v2 * Reworked to use SRV_STATS_STATE_* --- src/dumpstats.c | 7 ++- 1 file changed, 6 insertions

[PATCH v2 3/4] MEDIUM: Only report drain state in stats if server has SRV_ADMF_DRAIN set

2015-04-22 Thread Simon Horman
=*. This patch makes stats reporting consistent in this regard. This patch does not alter the behaviour that if a server's weight is zero then its stats row is blue when accessed via HTML. This remains the case regardless of if the state is UP or DRAIN. Signed-off-by: Simon Horman ho...@verge.net.au

[PATCH v2 2/4] MEDIUM: Separate server state and colour in stats

2015-04-22 Thread Simon Horman
distinguish between DRAIN states and DRAINING colours. Signed-off-by: Simon Horman ho...@verge.net.au --- v2 * First post --- src/dumpstats.c | 134 +++- 1 file changed, 83 insertions(+), 51 deletions(-) diff --git a/src/dumpstats.c b/src/dumpstats.c

[PATCH 0/2] Minor enhancements to drain state

2015-04-09 Thread Simon Horman
=DRAIN,weight=* when reporting stats. 2. Differentiate between DRAIN and DRAIN (agent) The motivation here is to make DRAIN consistent with DOWN. Patches have been lightly tested. Simon Horman (2): MEDIUM: Only report drain state in stats if server has SRV_ADMF_DRAIN set MEDIUM

[PATCH 2/2] MEDIUM: Differentiate between DRAIN and DRAIN (agent)

2015-04-09 Thread Simon Horman
Differentiate between DRAIN and DRAIN (agent) when reporting stats. This is consistent with the distinction made between DOWN and DOWN (agent). Signed-off-by: Simon Horman ho...@verge.net.au --- src/dumpstats.c | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) diff

[PATCH 1/2] MEDIUM: Only report drain state in stats if server has SRV_ADMF_DRAIN set

2015-04-09 Thread Simon Horman
=*. This patch makes stats reporting consistent in this regard. Signed-off-by: Simon Horman ho...@verge.net.au --- src/dumpstats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dumpstats.c b/src/dumpstats.c index d82ce8538841..9f5a4349d231 100644 --- a/src/dumpstats.c +++ b

Re: [PATCH] BUG/MEDIUM: Do not consider an agent check as failed on L7 error

2015-02-25 Thread Simon Horman
On Thu, Feb 26, 2015 at 07:09:25AM +0100, Willy Tarreau wrote: Hi Simon, On Thu, Feb 26, 2015 at 11:26:17AM +0900, Simon Horman wrote: As failure to connect to the agent check is not sufficient to mark it as failed it stands to reason that an L7 error shouldn't either. Without

[PATCH 2/2] MEDIUM: Allow suppression of email alerts by log level

2015-02-05 Thread Simon Horman
configuration option to set the maximum level to notice or greater. email-alert level notice Signed-off-by: Simon Horman ho...@verge.net.au --- doc/configuration.txt | 36 ++-- include/proto/checks.h | 4 ++-- include/types/proxy.h | 3 +++ src/cfgparse.c

[PATCH 0/2] Allow suppression of email alerts by log level

2015-02-05 Thread Simon Horman
configuration option to set the maximum level to notice or greater. email-alert level notice The first patch in the series provides a contextual dependency of the second patch. Simon Horman (2): LOW: Remove trailing '.' from email alert messages MEDIUM: Allow suppression of email

[PATCH 1/2] LOW: Remove trailing '.' from email alert messages

2015-02-05 Thread Simon Horman
This removes the trailing '.' from both the header and the body of email alerts. The main motivation for this change is to make the format of email alerts generated from srv_set_stopped() consistent with those generated from set_server_check_status(). Signed-off-by: Simon Horman ho

Re: [PATCH/RFC 0/8] Email Alerts

2015-02-03 Thread Simon Horman
On Tue, Feb 03, 2015 at 05:13:02PM +0100, Baptiste wrote: On Tue, Feb 3, 2015 at 4:59 PM, Pavlos Parissis pavlos.paris...@gmail.com wrote: On 01/02/2015 03:15 μμ, Willy Tarreau wrote: Hi Simon, On Fri, Jan 30, 2015 at 11:22:52AM +0900, Simon Horman wrote: Hi Willy, Hi All

[PATCH] MEDIUM: Document email alerts

2015-02-02 Thread Simon Horman
Signed-off-by: Simon Horman ho...@verge.net.au --- doc/configuration.txt | 104 ++ 1 file changed, 104 insertions(+) diff --git a/doc/configuration.txt b/doc/configuration.txt index c829590..aa3f30f 100644 --- a/doc/configuration.txt +++ b/doc

Re: [PATCH/RFC 0/8] Email Alerts

2015-02-01 Thread Simon Horman
Hi Willy, On Sun, Feb 01, 2015 at 03:15:27PM +0100, Willy Tarreau wrote: Hi Simon, On Fri, Jan 30, 2015 at 11:22:52AM +0900, Simon Horman wrote: Hi Willy, Hi All, the purpose of this email is to solicit feedback on an implementation of email alerts for haproxy the design of which

[PATCH/RFC 7/8] MEDIUM: Allow configuration of email alerts

2015-01-31 Thread Simon Horman
This currently does nothing beyond parsing the configuration and storing in the proxy as there is no implementation of email alerts. Signed-off-by: Simon Horman ho...@verge.net.au --- include/types/mailers.h | 6 +-- include/types/proxy.h | 10 + src/cfgparse.c | 109

[PATCH/RFC 1/8] MEDIUM: Remove connect_chk

2015-01-31 Thread Simon Horman
Remove connect_chk and instead call connect_proc_chk() and connect_conn_chk(). There no longer seems to be any value in having a wrapper function here. Signed-off-by: Simon Horman ho...@verge.net.au --- src/checks.c | 25 ++--- 1 file changed, 2 insertions(+), 23 deletions

[PATCH/RFC 4/8] MEDIUM: Move proto and addr fields struct check

2015-01-31 Thread Simon Horman
-by: Simon Horman ho...@verge.net.au --- include/types/checks.h | 2 ++ include/types/server.h | 5 - src/checks.c | 14 +++--- src/server.c | 14 +++--- 4 files changed, 16 insertions(+), 19 deletions(-) diff --git a/include/types/checks.h b/include/types

[PATCH/RFC 6/8] MEDIUM: Add parsing of mailers section

2015-01-31 Thread Simon Horman
As mailer and mailers structures and allow parsing of a mailers section into those structures. These structures will subsequently be freed as it is not yet possible to use reference them in the configuration. Signed-off-by: Simon Horman ho...@verge.net.au --- Makefile| 2

[PATCH/RFC 5/8] MEDIUM: Attach tcpcheck_rules to check

2015-01-31 Thread Simon Horman
This is to allow checks to be established whose tcpcheck_rules are not those of its proxy. Signed-off-by: Simon Horman ho...@verge.net.au --- include/types/checks.h | 1 + src/checks.c | 34 +- src/server.c | 1 + 3 files changed, 19

[PATCH/RFC 2/8] MEDIUM: Refactor init_check and move to checks.c

2015-01-31 Thread Simon Horman
Refactor init_check so that an error string is returned rather than alerts being printed by it. Also init_check to checks.c and provide a prototype to allow it to be used from multiple C files. Signed-off-by: Simon Horman ho...@verge.net.au --- include/proto/checks.h | 2 ++ src/checks.c

[PATCH/RFC 8/8] MEDIUM: Support sending email alerts

2015-01-31 Thread Simon Horman
Signed-off-by: Simon Horman ho...@verge.net.au --- include/proto/checks.h | 2 + include/types/checks.h | 2 +- include/types/proxy.h | 18 ++- src/cfgparse.c | 26 ++-- src/checks.c | 321 + src/server.c | 1

[PATCH/RFC 0/8] Email Alerts

2015-01-31 Thread Simon Horman
. For reference this patchset is available in git https://github.com/horms/haproxy devel/email-alert This patchset is based on the current mainline master branch: the 1.6 development branch. The current head commit there is 32602d2 (BUG/MINOR: checks: prevent http keep-alive with http-check expect). Simon

Re: [PATCH 1/2] BUG/MEDIUM: Do not set agent health to zero if server is disabled in config

2015-01-22 Thread Simon Horman
On Thu, Jan 22, 2015 at 08:24:57PM +0100, Willy Tarreau wrote: Hi Simon, On Tue, Jan 20, 2015 at 01:22:38PM +0900, Simon Horman wrote: (...) This seems to have slipped through the cracks. I'm wondering if we could revisit it and the other patch in this series. Hmmm sorry for that. You

Re: [PATCH 1/2] BUG/MEDIUM: Do not set agent health to zero if server is disabled in config

2015-01-19 Thread Simon Horman
Hi Willy, On Mon, Dec 01, 2014 at 09:18:05AM +0900, Simon Horman wrote: On Wed, Nov 12, 2014 at 05:11:27PM +0900, Simon Horman wrote: On Wed, Nov 12, 2014 at 08:22:05AM +0100, Willy Tarreau wrote: Hi Simon, On Wed, Nov 12, 2014 at 03:55:53PM +0900, Simon Horman wrote: disable

Re: [PATCH 1/2] BUG/MEDIUM: Do not set agent health to zero if server is disabled in config

2014-11-30 Thread Simon Horman
On Wed, Nov 12, 2014 at 05:11:27PM +0900, Simon Horman wrote: On Wed, Nov 12, 2014 at 08:22:05AM +0100, Willy Tarreau wrote: Hi Simon, On Wed, Nov 12, 2014 at 03:55:53PM +0900, Simon Horman wrote: disable starts a server in the disabled state, however setting the health of an agent

Re: [PATCH 1/2] BUG/MEDIUM: Do not set agent health to zero if server is disabled in config

2014-11-12 Thread Simon Horman
On Wed, Nov 12, 2014 at 08:22:05AM +0100, Willy Tarreau wrote: Hi Simon, On Wed, Nov 12, 2014 at 03:55:53PM +0900, Simon Horman wrote: disable starts a server in the disabled state, however setting the health of an agent implies that the agent is disabled as well as the server

Re: Problems with agent check

2014-11-11 Thread Simon Horman
On Mon, Nov 10, 2014 at 01:45:45PM +0100, Cyril Bonté wrote: Hi, Le 10/11/2014 12:54, Lasse Birnbaum Jensen a écrit : Hi all I have a problem with agent checks on a ssl backend (i cannot change the backend to http). This configuration forces the agent-check port expect ssl, which seems

[PATCH 1/2] BUG/MEDIUM: Do not set agent health to zero if server is disabled in config

2014-11-11 Thread Simon Horman
Signed-off-by: Simon Horman ho...@verge.net.au --- src/cfgparse.c | 1 - src/server.c | 1 - 2 files changed, 2 deletions(-) diff --git a/src/cfgparse.c b/src/cfgparse.c index 09a0fd3..820fbf4 100644 --- a/src/cfgparse.c +++ b/src/cfgparse.c @@ -6982,7 +6982,6 @@ out_uri_auth_compat

[PATCH 2/2] MEDIUM/BUG: Only explicitly report DOWN (agent) if the agent health is zero

2014-11-11 Thread Simon Horman
by agent prior to reporting up). Note that DOWN (agent) may also be reported by a more generic conditional which immediately follows the code changed by this patch. Reported-by: Mark Brooks m...@loadbalancer.org Signed-off-by: Simon Horman ho...@verge.net.au --- src/dumpstats.c | 2 +- 1 file

[PATCH 0/2] Do not incorrectly report status as DOWN (agent)

2014-11-11 Thread Simon Horman
Hi, this short series is intended to address to cases where the status of a backend is incorrectly reported as DOWN (agent). Simon Horman (2): BUG/MEDIUM: Do not set agent health to zero if server is disabled in config MEDIUM/BUG: Only explicitly report DOWN (agent) if the agent health

Re: Problem with external healthchecks and haproxy-ss-20140720

2014-08-15 Thread Simon Horman
[Cc Malcolm Turnbull] On Fri, Aug 15, 2014 at 12:29:36AM +0200, Willy Tarreau wrote: Hi Cyril! On Thu, Aug 14, 2014 at 10:30:52PM +0200, Cyril Bonté wrote: Hi all, Le 07/08/2014 01:16, Cyril Bonté a écrit : Hi Bjoern, Le 06/08/2014 22:16, bjun...@gmail.com a écrit : (...)

Re: Problem with external healthchecks and haproxy-ss-20140720

2014-08-15 Thread Simon Horman
On Fri, Aug 15, 2014 at 09:12:56AM +0100, Malcolm Turnbull wrote: I agree as well.. :-). Our original specification was to match the way that ldirectord does its external health checks (so that the customer scripts are compatible). We could just change ldirectord to be compatible with the

Re: Email Alert Proposal

2014-06-24 Thread Simon Horman
On Tue, Jun 24, 2014 at 07:29:15AM +0200, Willy Tarreau wrote: Hi Simon, On Tue, Jun 24, 2014 at 09:15:13AM +0900, Simon Horman wrote: Hi Willy, Malcolm has asked me to open a discussion with you regarding adding email alerts to haproxy and that is the purpose of this email

[PATCH] BUG/MEDIUM: Consistently use 'check' in process_chk

2014-06-19 Thread Simon Horman
I am not entirely sure that this is a bug, but it seems to me that it may cause a problem if there agent-check is configured and there is some kind of error making a connection for it. Signed-off-by: Simon Horman ho...@verge.net.au --- src/checks.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH] MEDIUM: Add external check

2014-06-19 Thread Simon Horman
Add an external check which makes use of an external process to check the status of a server. --- v8 * Rebase onto v1.6-dev0 v7 * Manual Rebase * Make option external-check configuration parameter boolean * Add external-check command configuration parameter * Add external-check path

Re: [PATCH] BUG/MEDIUM: Consistently use 'check' in process_chk

2014-06-19 Thread Simon Horman
On Fri, Jun 20, 2014 at 07:07:56AM +0200, Willy Tarreau wrote: On Fri, Jun 20, 2014 at 12:29:47PM +0900, Simon Horman wrote: I am not entirely sure that this is a bug, but it seems to me that it may cause a problem if there agent-check is configured and there is some kind of error making

Re: [PATCH] MEDIUM: Add external check

2014-06-19 Thread Simon Horman
On Fri, Jun 20, 2014 at 07:10:55AM +0200, Willy Tarreau wrote: On Fri, Jun 20, 2014 at 12:30:16PM +0900, Simon Horman wrote: Add an external check which makes use of an external process to check the status of a server. --- v8 * Rebase onto v1.6-dev0 Looks fine, applied to 1.6

Re: [PATCH v8] MEDIUM: Add port_to_str helper

2014-06-16 Thread Simon Horman
On Mon, Jun 16, 2014 at 10:11:10AM +0200, Willy Tarreau wrote: On Mon, Jun 16, 2014 at 09:39:41AM +0900, Simon Horman wrote: This helper is similar to addr_to_str but tries to convert the port rather than the address of a struct sockaddr_storage. This is in preparation for supporting

Re: [PATCH v7 1/3] MEDIUM: Add port_to_str helper

2014-06-15 Thread Simon Horman
On Mon, Jun 16, 2014 at 08:55:52AM +0900, Simon Horman wrote: On Fri, Jun 13, 2014 at 06:39:18PM +0200, Willy Tarreau wrote: On Fri, Jun 13, 2014 at 04:18:15PM +0900, Simon Horman wrote: This helper is similar to addr_to_str but tries to convert the port rather than the address

[PATCH v8] MEDIUM: Add port_to_str helper

2014-06-15 Thread Simon Horman
This helper is similar to addr_to_str but tries to convert the port rather than the address of a struct sockaddr_storage. This is in preparation for supporting an external agent check. Signed-off-by: Simon Horman ho...@verge.net.au -- v8 * Correct endian problem by calling ntohs(port) v7

[PATCH v7 0/3] MEDIUM: Add external check

2014-06-13 Thread Simon Horman
Add an external check which makes use of an external process to check the status of a server. v7 updates this patchset as per the feedback received for v6 (a very long time ago). Simon Horman (3): MEDIUM: Add port_to_str helper MEDIUM: Break out check establishment into connect_chk

[PATCH v7 1/3] MEDIUM: Add port_to_str helper

2014-06-13 Thread Simon Horman
This helper is similar to addr_to_str but tries to convert the port rather than the address of a struct sockaddr_storage. This is in preparation for supporting an external agent check. Signed-off-by: Simon Horman ho...@verge.net.au -- v7 * First post --- include/common/standard.h | 8

[PATCH v7 2/3] MEDIUM: Break out check establishment into connect_chk()

2014-06-13 Thread Simon Horman
This is in preparation for adding a new type of check that uses a process rather than a socket. Signed-off-by: Simon Horman ho...@verge.net.au --- v7 * Use connect_chk() as the name of the new function * Manual rebase - Add SN_ERR_UP return value to connect_chk() to handle the case where

[PATCH v7 3/3] MEDIUM: Add external check

2014-06-13 Thread Simon Horman
Add an external check which makes use of an external process to check the status of a server. --- Status: pending v7 * Manual Rebase * Make option external-check configuration parameter boolean * Add external-check command configuration parameter * Add external-check path configuration

Re: [PATCH v7 0/3] MEDIUM: Add external check

2014-06-13 Thread Simon Horman
On Fri, Jun 13, 2014 at 10:41:54AM +0200, Willy Tarreau wrote: Hi Simon! On Fri, Jun 13, 2014 at 04:18:14PM +0900, Simon Horman wrote: Add an external check which makes use of an external process to check the status of a server. v7 updates this patchset as per the feedback received

Re: Health check hell

2013-12-02 Thread Simon Horman
On Thu, Nov 28, 2013 at 03:41:15PM +0100, Willy Tarreau wrote: Hi guys, I'm CCing the persons who've been most involved in the evolutions of the health check system and who might have strong opinions about what to take care of. The recent inclusion of the agent-check has unveiled how much

Re: set weight bug?

2013-11-27 Thread Simon Horman
On Wed, Nov 27, 2013 at 05:09:47PM +0100, Willy Tarreau wrote: On Wed, Nov 27, 2013 at 10:41:12PM +0800, Igor wrote: It's almost the same except some servers with weight=0 in conf, script to disable/enable servers works fine with haproxy-ss-20131031, but with haproxy-ss-20131122 or newer,

Re: [PATCH v7 0/9] Auxiliary Agent Check

2013-11-26 Thread Simon Horman
On Mon, Nov 25, 2013 at 12:43:59PM +0100, Willy Tarreau wrote: On Mon, Nov 25, 2013 at 10:06:16AM +, Malcolm Turnbull wrote: Willy, Our agent currently replies with: drain\n stop\n 50%\n etc. and its not in production yet (looking forward to it being merged), so no

[PATCH v7 0/9] Auxiliary Agent Check

2013-11-24 Thread Simon Horman
-v7.snapshot.20141125 Simon Horman (9): MEDIUM: Add helper for task creation for checks MEDIUM: Add helper function for failed checks MEDIUM: Log agent fail, stopped or down as info MEDIUM: Remove option lb-agent-chk MEDIUM: checks: Add supplementary agent checks MEDIUM: Do not mark

[PATCH v7 1/9] MEDIUM: Add helper for task creation for checks

2013-11-24 Thread Simon Horman
This helper is in preparation for adding a second struct check element to struct server. Signed-off-by: Simon Horman ho...@verge.net.au --- v7 * Moved cfgparse change to previous patch * Reversed polarity of start_check_task() and updated caller accordingly * Move increment of servpos

[PATCH v7 6/9] MEDIUM: Do not mark a server as down if the agent is unavailable

2013-11-24 Thread Simon Horman
In the case where agent-port is used and the agent check is a secondary check to not mark a server as down if the agent becomes unavailable. In this configuration the agent should only cause a server to be marked as down if the agent returns fail, stopped or down. Signed-off-by: Simon Horman ho

[PATCH v7 8/9] MEDIUM: Add enable and disable agent unix socket commands

2013-11-24 Thread Simon Horman
being overridden by the agent. Signed-off-by: Simon Horman ho...@verge.net.au --- v7 * Manual rebase * Use enable|disable agent backend/server instead of set agent backend/server pause|unpause. - This is a reasonably trivial re-write of most of the patch * Rename patch from MEDIUM: Add set

[PATCH v7 9/9] MEDIUM: Add DRAIN state and report it on the stats page

2013-11-24 Thread Simon Horman
Add a DRAIN sub-state for a server which will be shown on the stats page instead of UP if its effective weight is zero. Also, log if a server enters or leaves the DRAIN state as the result of an agent check. Signed-off-by: Simon Horman ho...@verge.net.au --- Status: pending v7 * Update

[PATCH v7 5/9] MEDIUM: checks: Add supplementary agent checks

2013-11-24 Thread Simon Horman
-off-by: Simon Horman ho...@verge.net.au --- v7 * Manual Rebase * Add agent-check keyword which is used to enable agent checks explicitly. This allows the agent-port setting to be used in the default-server without enabling agent checks for all servers. * Enhance documentation to note

[PATCH v7 0/5] Auxiliary Agent Check Preparation

2013-11-05 Thread Simon Horman
-check-v7.snapshot.20131105 Simon Horman (5): MEDIUM: Move result element to struct check MEDIUM: Paramatise functions over the check of a server MEDIUM: cfgparse: Factor out check initialisation MEDIUM: Add state to struct check MEDIUM: Move health element to struct check include/proto

[PATCH v7 4/5] MEDIUM: Add state to struct check

2013-11-05 Thread Simon Horman
as well as the server's existing check. Signed-off-by: Simon Horman horms+rene...@verge.net.au --- v8 * Use CHK_STATE_RUNNING instead of CHK_RUNNING Notes by Willy on v6: Please use CHK_STATE_RUNNING instead of CHK_RUNNING so that it's easier to know it is related to the state attribute

[PATCH v7 2/5] MEDIUM: Paramatise functions over the check of a server

2013-11-05 Thread Simon Horman
. If NULL is used for case 2) then SSP_O_HCHK becomes supurfulous and as NULL is used for case 2) SSP_O_HCHK has been removed. Signed-off-by: Simon Horman ho...@verge.net.au --- This is a rather large patch and I would be happy to split it up on request. --- v7 * Paramatise set_server_enabled

[PATCH v7 3/5] MEDIUM: cfgparse: Factor out check initialisation

2013-11-05 Thread Simon Horman
This is in preparation for struct server having two elements of type struct check. Signed-off-by: Simon Horman ho...@verge.net.au --- v7 * No change Notes by Willy on v6: OK v5 * Remove server argument from init_check. It is not used. * Set type in init_check This allows a zero type

[PATCH v7 5/5] MEDIUM: Move health element to struct check

2013-11-05 Thread Simon Horman
This is in preparation for associating a agent check with a server which runs as well as the server's existing check. Signed-off-by: Simon Horman ho...@verge.net.au --- v7 * Merge line-reordering update from a subsequent patch * Rebase as name field is no longer added to struct check

Re: [PATCH v7 4/5] MEDIUM: Add state to struct check

2013-11-05 Thread Simon Horman
On Tue, Nov 05, 2013 at 06:04:35PM +0900, Simon Horman wrote: Add state to struct check. This is currently used to store one bit, CHK_RUNNING, which is set if a check is running and clear otherwise. This bit was previously SRV_CHK_RUNNING of the state element of struct server

[PATCH] LOW: Remove unused 'last_slowstart_change' field from struct peer

2013-11-01 Thread Simon Horman
This was inadvertently added by MEDIUM: checks: Add agent health check. It appears to have never been used. Signed-off-by: Simon Horman ho...@verge.net.au --- include/types/peers.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/types/peers.h b/include/types/peers.h index 41a1cce

Re: [PATCH] LOW: Remove unused 'last_slowstart_change' field from struct peer

2013-11-01 Thread Simon Horman
On Fri, Nov 01, 2013 at 04:43:18PM +0900, Simon Horman wrote: This was inadvertently added by MEDIUM: checks: Add agent health check. It appears to have never been used. The prefix in the subject should be CLEANUP rather than LOW. I will repost. Signed-off-by: Simon Horman ho

[PATCH v7] CLEANUP: Make parameters of srv_downtime and srv_getinter const

2013-11-01 Thread Simon Horman
The parameters of srv_downtime and srv_getinter are not modified and thus may be const. Signed-off-by: Simon Horman ho...@verge.net.au --- v7 * No change Notes by Willy on v6: OK --- include/proto/server.h | 4 ++-- src/server.c | 4 ++-- 2 files changed, 4 insertions(+), 4

[PATCH v2] CLEANUP: Remove unused 'last_slowstart_change' field from struct peer

2013-11-01 Thread Simon Horman
This was inadvertently added by MEDIUM: checks: Add agent health check. It appears to have never been used. Signed-off-by: Simon Horman ho...@verge.net.au --- v2 * Use CLEANUP in subject --- include/types/peers.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/types/peers.h b

  1   2   3   4   >