Re: [PATCH v7 0/5] Auxiliary Agent Check Preparation

2013-11-19 Thread Simon Horman
On Tue, Nov 19, 2013 at 09:39:02AM +0100, Willy Tarreau wrote: > On Tue, Nov 19, 2013 at 04:56:42PM +0900, Simon Horman wrote: > > > So please just tell me if you want me to simply pick all these > > > patches from your tree, in which case I will simply do that (I'm >

Re: [PATCH v7 0/5] Auxiliary Agent Check Preparation

2013-11-18 Thread Simon Horman
On Tue, Nov 19, 2013 at 08:08:26AM +0100, Willy Tarreau wrote: > Hi Simon, > > On Tue, Nov 19, 2013 at 12:45:50PM +0900, Simon Horman wrote: > > On Mon, Nov 18, 2013 at 07:36:58AM +0100, Willy Tarreau wrote: > > > On Mon, Nov 18, 2013 at 03:22:33PM +0900, Simon Horman wr

Re: [PATCH v7 0/5] Auxiliary Agent Check Preparation

2013-11-18 Thread Simon Horman
On Mon, Nov 18, 2013 at 07:36:58AM +0100, Willy Tarreau wrote: > On Mon, Nov 18, 2013 at 03:22:33PM +0900, Simon Horman wrote: > > On Mon, Nov 18, 2013 at 06:45:41AM +0100, Willy Tarreau wrote: > > > Hi Simon, > > > > > > On Tue, Nov 05, 2013 at 06:04:31PM +

Re: [PATCH v7 0/5] Auxiliary Agent Check Preparation

2013-11-17 Thread Simon Horman
On Mon, Nov 18, 2013 at 06:45:41AM +0100, Willy Tarreau wrote: > Hi Simon, > > On Tue, Nov 05, 2013 at 06:04:31PM +0900, Simon Horman wrote: > > Hi, > > > > This series is a revised subset of > > "[PATCH v6 00/22] Agent Check Enhancements and External

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 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 --- v7 * Merge line-reordering update from a subsequent patch * Rebase as name field is no longer added to struct check by a previous patch

[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 --- 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 to be used to indicate

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

2013-11-05 Thread Simon Horman
ing NULL. 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 --- This is a rather large patch and I would be happy to split it up on request. --- v7 * Paramatise set_server_enabled() over t

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

2013-11-05 Thread Simon Horman
well as the server's existing check. Signed-off-by: Simon Horman --- 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 of the check.

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

2013-11-05 Thread Simon Horman
Move result element from struct server to struct check This allows check results to be independent of the check's server. 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 --- v7 * No cha

[PATCH v7 0/5] Auxiliary Agent Check Preparation

2013-11-05 Thread Simon Horman
at https://github.com/horms/haproxy.git/agent-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

[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 --- v2 * Use CLEANUP in subject --- include/types/peers.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/types/peers.h b/include/typ

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. > > Signe

[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 --- v7 * No change Notes by Willy on v6: OK --- include/proto/server.h | 4 ++-- src/server.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a

[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 --- include/types/peers.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/types/peers.h b/include/types/peers.h index 41a1cce..d52d

Re: [PATCH v6 00/22] Agent Check Enhancements and External Check

2013-10-31 Thread Simon Horman
On Thu, Oct 31, 2013 at 10:26:06AM +0100, Willy Tarreau wrote: > Hi Malcolm, > > On Thu, Oct 31, 2013 at 09:02:04AM +, Malcolm Turnbull wrote: > > Willy / Simon, > > > > We haven't implemented it in the Loadbalancer.org appliance yet so we > > are happy for lb-agent-chk to be replaced. > > E

Re: [PATCH v6 00/22] Agent Check Enhancements and External Check

2013-10-31 Thread Simon Horman
hope we can sort out all remaining > points to get it merged into 1.5-dev20. > > Best regards, > Willy > > --- > > commit 08eff21897f3f5d62f1360f309c5a71da6146afa > Author: Simon Horman > Date: Sat Feb 23 08:34:13 2013 +0900 > > DOC: Clarify documentation of

Re: HAProxy v1.5-dev19 OpenSSL Support Issue

2013-08-22 Thread Simon Horman
On Thu, Aug 22, 2013 at 09:36:34AM +0100, Scott McKeown wrote: > Sorry I must have forgot/overlooked replying to this. > > However, I did manage to get the OpenSSL Support working with the current > v1.5-dev19 downloaded directly from the the HAProxy website using the tar > image. > Saying that th

Re: If anyone is interested in testing Simon Hormans patches for the server feedback agent

2013-08-22 Thread Simon Horman
On Thu, Aug 22, 2013 at 10:11:27AM +0200, Baptiste wrote: > Let us know there, so I can test it as soon as released :) I have just released v6 to the mailing list as "[PATCH v6 00/22] Agent Check Enhancements and External Check". It can be found in git at https://github.com/horms/haproxy.git age

[PATCH v6 15/22] MEDIUM: Add http-check agent-hdr option

2013-08-22 Thread Simon Horman
Allow agent checks to obtain information in an HTTP header of the response to an http check. Signed-off-by: Simon Horman --- v4 * Do not duplicate code that is in process_result() v2 - v3 * No change --- doc/configuration.txt | 24 +-- include/types/proxy.h | 2 ++ src

[PATCH v6 19/22] MEDIUM: Set rise and fall of agent checks to 1

2013-08-22 Thread Simon Horman
f the agent check to be configurable, however this has not been implemented at this stage. Signed-off-by: Simon Horman --- v7 When checking health against rise in set_server_up the health of a check should be checked against the rise of the same check. Otherwise the condition for the s->agent

[PATCH v6 20/22] MEDIUM: Add set agent pause|unpause unix socket command

2013-08-22 Thread Simon Horman
motivation for this option is to allow weight setting is to allow the weight changing effects of the agent checks to be paused to allow the weight of a server to be configured using set weight without being overridden by the agent. The default state is unpaused. Signed-off-by: Simon Horman

[PATCH v6 21/22] MEDIUM: Break out check establishment into establish_chk()

2013-08-22 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 --- v4 * Use check->type in establish_conn_chk() Use check->type instead of s->proxy->options2 & PR_O2_CHK_ANY as the former is specific to the check

[PATCH v6 16/22] MEDIUM: Add DRAIN state and report it on the stats page

2013-08-22 Thread Simon Horman
Add a DRAIN sub-state for a server which will be shown on the stats page instead of UP if an agent check is in use and the agent has most recently returned "drain". Signed-off-by: Simon Horman --- include/types/server.h | 3 ++- src/checks.c | 7 +++ src/dumpstats.c

[PATCH v6 10/22] MEDIUM: Move health element to struct check

2013-08-22 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 --- include/types/server.h | 3 ++- src/cfgparse.c | 10 +- src/checks.c

[PATCH v6 18/22] MEDIUM: Do not mark a server as down if the agent is unavailable

2013-08-22 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 "dow

[PATCH v6 03/22] MEDIUM: Split up struct server's check element

2013-08-22 Thread Simon Horman
his will not be so easy once a second struct check element is added to struct server to accommodate an agent health check. Signed-off-by: Simon Horman --- v6 * Correct use of srv->check_common.xprt ssl_sock_prepare_srv_ctx(). Previously srv->check.xprt was used which causes a

[PATCH v6 01/22] DOC: Clarify documentation of option lb-agent-chk

2013-08-22 Thread Simon Horman
Avoid referring to check-port as this is not a configuration parameter. Signed-off-by: Simon Horman --- doc/configuration.txt | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/configuration.txt b/doc/configuration.txt index 87de595..796537e 100644 --- a/doc

[PATCH v6 12/22] MEDIUM: checks: Add supplementary agent checks

2013-08-22 Thread Simon Horman
127.0.0.1:80 check agent-port 1 The agent-inter parameter may also be used to specify the interval and timeout for agent checks. If either the health or agent check determines that a server is down then it is marked as being down, otherwise it is marked as being up. Signed-off-by: Simon Horman

[PATCH v6 13/22] MEDIUM: Add helper for agent check events.

2013-08-22 Thread Simon Horman
Break agent check handling out of event_srv_chk_r(). This is in preparation for supporting agent check results returned in an HTTP header. Signed-off-by: Simon Horman --- src/checks.c | 97 1 file changed, 52 insertions(+), 45

[PATCH v6 11/22] MEDIUM: Add helper for task creation for checks

2013-08-22 Thread Simon Horman
This helper is in preparation for adding a second struct check element to struct server. Signed-off-by: Simon Horman --- v5 * Rebase --- src/cfgparse.c | 3 +-- src/checks.c | 45 +++-- 2 files changed, 28 insertions(+), 20 deletions(-) diff --git a

[PATCH v6 06/22] MEDIUM: Paramatise functions over the check of a server

2013-08-22 Thread Simon Horman
check->server. This is in preparation for associating a agent check with a server which runs as well as the server's existing check. By paramatising these functions they may act on each of the checks without further significant modification. Signed-off-by: Simon Horman --- This is

[PATCH v6 07/22] MEDIUM: cfgparse: Factor out check initialisation

2013-08-22 Thread Simon Horman
This is in preparation for struct server having two elements of type struct check. Signed-off-by: Simon Horman --- v5 * Remove server argument from init_check. It is not used. * Set type in init_check This allows a zero type to be used to indicate that a task for a secondary agent check

[PATCH v6 08/22] MEDIUM: Add state to struct check

2013-08-22 Thread Simon Horman
well as the server's existing check. Signed-off-by: Simon Horman --- include/types/server.h | 5 - src/checks.c | 8 src/dumpstats.c| 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/include/types/server.h b/include/types/server.h index 57

[PATCH v6 00/22] Agent Check Enhancements and External Check

2013-08-22 Thread Simon Horman
Hi, this series comprises of several components I have combined them because they depend on each other. It should be possible to review the components in order without particular regard for subsequent components. That is, it should be possible to review small subsets of this series. A. Patches

[PATCH v6 22/22] MEDIUM: Add external check

2013-08-22 Thread Simon Horman
Add an external check which makes use of an external process to check the status of a server. --- v6 * Correct implementation and documentation of arguments to external-check command so that they are consistent with both each other and ldirectord's external check. The motivation being to allo

[PATCH v6 04/22] MEDIUM: Move {,fast,down}inter to struct check

2013-08-22 Thread Simon Horman
Move {,fast,down}inter elements from struct server to struct check. This allows those elements of a check to be independent of the check's server. 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: Si

[PATCH v6 14/22] MEDIUM: Parser to allow matching of HTTP header

2013-08-22 Thread Simon Horman
Replace the current header parser, which simply skips the headers, with a version that allows matching of a key in a header. This is in preparation for supporting agent check results returned in an HTTP header. Signed-off-by: Simon Horman --- src/checks.c | 94

[PATCH v6 05/22] MEDIUM: Move result element to struct check

2013-08-22 Thread Simon Horman
Move result element from struct server to struct check This allows check results to be independent of the check's server. 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 --- include/type

[PATCH v6 02/22] CLEANUP: Make parameters of srv_downtime and srv_getinter const

2013-08-22 Thread Simon Horman
The parameters of srv_downtime and srv_getinter are not modified and thus may be const. Signed-off-by: Simon Horman --- include/proto/server.h | 4 ++-- src/server.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/proto/server.h b/include/proto

[PATCH v6 09/22] MEDIUM: Add name element to struct check

2013-08-22 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 --- v5 * Rebase --- include/types/server.h | 1 + src/cfgparse.c | 1 + src/checks.c | 2 +- 3 files changed, 3 insertions(

[PATCH v6 17/22] MEDIUM: Log agent fail, stopped or down as info

2013-08-22 Thread Simon Horman
-by: Simon Horman --- src/checks.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/checks.c b/src/checks.c index a9a93ae..706ed31 100644 --- a/src/checks.c +++ b/src/checks.c @@ -867,10 +867,7 @@ static void agent_expect(struct check *check, char *data

Re: HAProxy v1.5-dev19 OpenSSL Support Issue

2013-08-22 Thread Simon Horman
On Tue, Aug 13, 2013 at 04:56:57PM +0200, Willy Tarreau wrote: > On Tue, Aug 13, 2013 at 03:36:09PM +0100, Scott McKeown wrote: > > Hi Guys, > > > > I've not applied any patches to the download as this was a direct 'wget' > > from the Git repository. > > As follows is the OpenSSL v1.0.0 Centos 6.4

Re: If anyone is interested in testing Simon Hormans patches for the server feedback agent

2013-08-21 Thread Simon Horman
On Wed, Aug 21, 2013 at 10:25:58AM +0200, Willy Tarreau wrote: > Hi Malcolm, > > On Thu, Aug 15, 2013 at 06:34:16PM +0100, Malcolm Turnbull wrote: > > I've put up a quick blog entry here: > > http://blog.loadbalancer.org/open-source-windows-service-for-reporting-server-load-back-to-haproxy-load-ba

[PATCH v5 06/22] MEDIUM: Paramatise functions over the check of a server

2013-07-31 Thread Simon Horman
check->server. This is in preparation for associating a agent check with a server which runs as well as the server's existing check. By paramatising these functions they may act on each of the checks without further significant modification. Signed-off-by: Simon Horman --- This is

[PATCH v5 21/22] MEDIUM: Break out check establishment into establish_chk()

2013-07-31 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 --- v4 * Use check->type in establish_conn_chk() Use check->type instead of s->proxy->options2 & PR_O2_CHK_ANY as the former is specific to the check

[PATCH v5 19/22] MEDIUM: Set rise and fall of agent checks to 1

2013-07-31 Thread Simon Horman
f the agent check to be configurable, however this has not been implemented at this stage. Signed-off-by: Simon Horman --- v5 * Rebase --- include/common/defaults.h | 2 ++ include/types/server.h| 6 +++--- src/cfgparse.c| 28 +++-

[PATCH v5 09/22] MEDIUM: Add name element to struct check

2013-07-31 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 --- v5 * Rebase --- include/types/server.h | 1 + src/cfgparse.c | 1 + src/checks.c | 2 +- 3 files changed, 3 insertions(

[PATCH v5 07/22] MEDIUM: cfgparse: Factor out check initialisation

2013-07-31 Thread Simon Horman
This is in preparation for struct server having two elements of type struct check. Signed-off-by: Simon Horman --- v5 * Remove server argument from init_check. It is not used. * Set type in init_check This allows a zero type to be used to indicate that a task for a secondary agent check

[PATCH v5 15/22] MEDIUM: Add http-check agent-hdr option

2013-07-31 Thread Simon Horman
Allow agent checks to obtain information in an HTTP header of the response to an http check. Signed-off-by: Simon Horman --- v4 * Do not duplicate code that is in process_result() v2 - v3 * No change --- doc/configuration.txt | 24 +-- include/types/proxy.h | 2 ++ src

[PATCH v5 20/22] MEDIUM: Add set agent pause|unpause unix socket command

2013-07-31 Thread Simon Horman
motivation for this option is to allow weight setting is to allow the weight changing effects of the agent checks to be paused to allow the weight of a server to be configured using set weight without being overridden by the agent. The default state is unpaused. Signed-off-by: Simon Horman

[PATCH v5 14/22] MEDIUM: Parser to allow matching of HTTP header

2013-07-31 Thread Simon Horman
Replace the current header parser, which simply skips the headers, with a version that allows matching of a key in a header. This is in preparation for supporting agent check results returned in an HTTP header. Signed-off-by: Simon Horman --- src/checks.c | 94

[PATCH v5 00/22] Agent Check Enhancements and External Check

2013-07-31 Thread Simon Horman
Hi, this series comprises of several components A. Patches 0-1 are cleanup patches DOC: Clarify documentation of option lb-agent-chk CLEANUP: Make parameters of srv_downtime and srv_getinter const B. Patches 2 - 12 add support for a secondary agent health check In this mode, a non-agent

[PATCH v5 02/22] CLEANUP: Make parameters of srv_downtime and srv_getinter const

2013-07-31 Thread Simon Horman
The parameters of srv_downtime and srv_getinter are not modified and thus may be const. Signed-off-by: Simon Horman --- include/proto/server.h | 4 ++-- src/server.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/proto/server.h b/include/proto

[PATCH v5 17/22] MEDIUM: Log agent fail, stopped or down as info

2013-07-31 Thread Simon Horman
-by: Simon Horman --- src/checks.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/checks.c b/src/checks.c index a9a93ae..706ed31 100644 --- a/src/checks.c +++ b/src/checks.c @@ -867,10 +867,7 @@ static void agent_expect(struct check *check, char *data

[PATCH v5 10/22] MEDIUM: Move health element to struct check

2013-07-31 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 --- include/types/server.h | 3 ++- src/cfgparse.c | 10 +- src/checks.c

[PATCH v5 01/22] DOC: Clarify documentation of option lb-agent-chk

2013-07-31 Thread Simon Horman
Avoid referring to check-port as this is not a configuration parameter. Signed-off-by: Simon Horman --- doc/configuration.txt | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/configuration.txt b/doc/configuration.txt index 2c8fadf..11b2a1e 100644 --- a/doc

[PATCH v5 05/22] MEDIUM: Move result element to struct check

2013-07-31 Thread Simon Horman
Move result element from struct server to struct check This allows check results to be independent of the check's server. 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 --- include/type

[PATCH v5 12/22] MEDIUM: checks: Add supplementary agent checks

2013-07-31 Thread Simon Horman
127.0.0.1:80 check agent-port 1 The agent-inter parameter may also be used to specify the interval and timeout for agent checks. If either the health or agent check determines that a server is down then it is marked as being down, otherwise it is marked as being up. Signed-off-by: Simon Horman

[PATCH v5 11/22] MEDIUM: Add helper for task creation for checks

2013-07-31 Thread Simon Horman
This helper is in preparation for adding a second struct check element to struct server. Signed-off-by: Simon Horman --- v5 * Rebase --- src/cfgparse.c | 3 +-- src/checks.c | 45 +++-- 2 files changed, 28 insertions(+), 20 deletions(-) diff --git a

[PATCH v5 22/22] MEDIUM: Add external check

2013-07-31 Thread Simon Horman
Add an external check which makes use of an external process to check the status of a server. --- v5 * Rebase v4 * Remove stray use of s->check in process_chk() The check parameter should be used throughout process_chk() * Layer 7 timeouts of agent checks should be ignored * Ensure that argc i

[PATCH v5 03/22] MEDIUM: Split up struct server's check element

2013-07-31 Thread Simon Horman
his will not be so easy once a second struct check element is added to struct server to accommodate an agent health check. Signed-off-by: Simon Horman --- include/types/server.h | 31 +++ src/cfgparse.c | 15 --- src/checks.c | 12

[PATCH v5 04/22] MEDIUM: Move {,fast,down}inter to struct check

2013-07-31 Thread Simon Horman
Move {,fast,down}inter elements from struct server to struct check. This allows those elements of a check to be independent of the check's server. 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: Si

[PATCH v5 18/22] MEDIUM: Do not mark a server as down if the agent is unavailable

2013-07-31 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 "dow

[PATCH v5 16/22] MEDIUM: Add DRAIN state and report it on the stats page

2013-07-31 Thread Simon Horman
Add a DRAIN sub-state for a server which will be shown on the stats page instead of UP if an agent check is in use and the agent has most recently returned "drain". Signed-off-by: Simon Horman --- include/types/server.h | 3 ++- src/checks.c | 7 +++ src/dumpstats.c

[PATCH v5 13/22] MEDIUM: Add helper for agent check events.

2013-07-31 Thread Simon Horman
Break agent check handling out of event_srv_chk_r(). This is in preparation for supporting agent check results returned in an HTTP header. Signed-off-by: Simon Horman --- src/checks.c | 97 1 file changed, 52 insertions(+), 45

[PATCH v5 08/22] MEDIUM: Add state to struct check

2013-07-31 Thread Simon Horman
well as the server's existing check. Signed-off-by: Simon Horman --- include/types/server.h | 5 - src/checks.c | 8 src/dumpstats.c| 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/include/types/server.h b/include/types/server.h index 57

[PATCH 09/22] MEDIUM: Add name element to struct check

2013-07-23 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 --- include/types/server.h |1 + src/cfgparse.c |1 + src/checks.c |2 +- 3 files changed, 3 insertions(+), 1 del

[PATCH 19/22] MEDIUM: Set rise and fall of agent checks to 1

2013-07-23 Thread Simon Horman
f the agent check to be configurable, however this has not been implemented at this stage. Signed-off-by: Simon Horman --- include/common/defaults.h |2 ++ include/types/server.h|6 +++--- src/cfgparse.c| 28 +++---

[PATCH 21/22] MEDIUM: Break out check establishment into establish_chk()

2013-07-23 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 --- v4 * Use check->type in establish_conn_chk() Use check->type instead of s->proxy->options2 & PR_O2_CHK_ANY as the former is specific to the check

[PATCH 12/22] MEDIUM: checks: Add supplementary agent checks

2013-07-23 Thread Simon Horman
127.0.0.1:80 check agent-port 1 The agent-inter parameter may also be used to specify the interval and timeout for agent checks. If either the health or agent check determines that a server is down then it is marked as being down, otherwise it is marked as being up. Signed-off-by: Simon Horman

[PATCH 15/22] MEDIUM: Add http-check agent-hdr option

2013-07-23 Thread Simon Horman
Allow agent checks to obtain information in an HTTP header of the response to an http check. Signed-off-by: Simon Horman --- v4 * Do not duplicate code that is in process_result() v2 - v3 * No change --- doc/configuration.txt | 24 -- include/types/proxy.h |2 ++ src

[PATCH 17/22] MEDIUM: Log agent fail, stopped or down as info

2013-07-23 Thread Simon Horman
-by: Simon Horman --- src/checks.c |5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/checks.c b/src/checks.c index a9a93ae..706ed31 100644 --- a/src/checks.c +++ b/src/checks.c @@ -867,10 +867,7 @@ static void agent_expect(struct check *check, char *data

[PATCH 18/22] MEDIUM: Do not mark a server as down if the agent is unavailable

2013-07-23 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 "dow

[PATCH 11/22] MEDIUM: Add helper for task creation for checks

2013-07-23 Thread Simon Horman
This helper is in preparation for adding a second struct check element to struct server. Signed-off-by: Simon Horman --- src/cfgparse.c |3 +-- src/checks.c | 45 +++-- 2 files changed, 28 insertions(+), 20 deletions(-) diff --git a/src

[PATCH 22/22] MEDIUM: Add external check

2013-07-23 Thread Simon Horman
Add an external check which makes use of an external process to check the status of a server. --- v4 * Remove stray use of s->check in process_chk() The check parameter should be used throughout process_chk() * Layer 7 timeouts of agent checks should be ignored * Ensure that argc is never used

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

2013-07-19 Thread Simon Horman
Add a DRAIN sub-state for a server which will be shown on the stats page instead of UP if an agent check is in use and the agent has most recently returned "drain". Signed-off-by: Simon Horman --- include/types/server.h |3 ++- src/checks.c |7 +++ src/d

[PATCH 01/22] DOC: Clarify documentation of option lb-agent-chk

2013-07-19 Thread Simon Horman
Avoid referring to check-port as this is not a configuration parameter. Signed-off-by: Simon Horman --- doc/configuration.txt |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/configuration.txt b/doc/configuration.txt index 5140ff1..5297cfd 100644 --- a/doc

[PATCH 04/22] MEDIUM: Move {,fast,down}inter to struct check

2013-07-19 Thread Simon Horman
Move {,fast,down}inter elements from struct server to struct check. This allows those elements of a check to be independent of the check's server. 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: Si

[PATCH 05/22] MEDIUM: Move result element to struct check

2013-07-19 Thread Simon Horman
Move result element from struct server to struct check This allows check results to be independent of the check's server. 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 --- include/type

[PATCH 20/22] MEDIUM: Add set agent pause|unpause unix socket command

2013-07-19 Thread Simon Horman
motivation for this option is to allow weight setting is to allow the weight changing effects of the agent checks to be paused to allow the weight of a server to be configured using set weight without being overridden by the agent. The default state is unpaused. Signed-off-by: Simon Horman

[PATCH 14/22] MEDIUM: Parser to allow matching of HTTP header

2013-07-19 Thread Simon Horman
Replace the current header parser, which simply skips the headers, with a version that allows matching of a key in a header. This is in preparation for supporting agent check results returned in an HTTP header. Signed-off-by: Simon Horman --- src/checks.c | 94

[PATCH 03/22] MEDIUM: Split up struct server's check element

2013-07-19 Thread Simon Horman
his will not be so easy once a second struct check element is added to struct server to accommodate an agent health check. Signed-off-by: Simon Horman --- include/types/server.h | 31 +++ src/cfgparse.c | 15 --- src/checks.c

[PATCH 00/22] Agent Check Enhancements and External Check

2013-07-19 Thread Simon Horman
Hi, this series comprises of several components A. Patches 0-1 are cleanup patches DOC: Clarify documentation of option lb-agent-chk CLEANUP: Make parameters of srv_downtime and srv_getinter const B. Patches 2 - 12 add support for a secondary agent health check In this mode, a non-agent

[PATCH 06/22] MEDIUM: Paramatise functions over the check of a server

2013-07-19 Thread Simon Horman
check->server. This is in preparation for associating a agent check with a server which runs as well as the server's existing check. By paramatising these functions they may act on each of the checks without further significant modification. Signed-off-by: Simon Horman --- This is

[PATCH 02/22] CLEANUP: Make parameters of srv_downtime and srv_getinter const

2013-07-19 Thread Simon Horman
The parameters of srv_downtime and srv_getinter are not modified and thus may be const. Signed-off-by: Simon Horman --- include/proto/server.h |4 ++-- src/server.c |4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/proto/server.h b/include/proto

[PATCH 13/22] MEDIUM: Add helper for agent check events.

2013-07-19 Thread Simon Horman
Break agent check handling out of event_srv_chk_r(). This is in preparation for supporting agent check results returned in an HTTP header. Signed-off-by: Simon Horman --- src/checks.c | 97 +++--- 1 file changed, 52 insertions(+), 45

[PATCH 07/22] MEDIUM: cfgparse: Factor out check initialisation

2013-07-19 Thread Simon Horman
This is in preparation for struct server having two elements of type struct check. Signed-off-by: Simon Horman --- src/cfgparse.c | 59 +--- 1 file changed, 35 insertions(+), 24 deletions(-) diff --git a/src/cfgparse.c b/src/cfgparse.c

[PATCH 10/22] MEDIUM: Move health element to struct check

2013-07-19 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 --- include/types/server.h |3 ++- src/cfgparse.c | 10 +- src/checks.c |

[PATCH 08/22] MEDIUM: Add state to struct check

2013-07-19 Thread Simon Horman
well as the server's existing check. Signed-off-by: Simon Horman --- include/types/server.h |5 - src/checks.c |8 src/dumpstats.c|2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/include/types/server.h b/include/types/server.h

Re: trouble building on solaris

2013-05-01 Thread Simon Horman
On Wed, May 01, 2013 at 10:15:00AM +0200, Willy Tarreau wrote: > Hi Keith, > > On Tue, Apr 30, 2013 at 09:39:12AM +, keith anderson wrote: > > Benjamin Polidore writes: > > > > > > > > > > > sorry, this is 1.5 dev 14.  > > > > > > thanks.On Wed, Dec 5, 2012 at 9:17 AM, Benjamin Polidore >

Re: [PATCH 0/3] Add http-check agent-hdr option

2013-04-16 Thread Simon Horman
On Wed, Apr 17, 2013 at 08:03:11AM +0200, Willy Tarreau wrote: > Hi Simon, > > On Wed, Apr 17, 2013 at 02:36:36PM +0900, Simon Horman wrote: > > Hi Willy, > > > > On Mon, Apr 01, 2013 at 11:29:12PM +0200, Willy Tarreau wrote: > > > Hi Simon, > > >

Re: [PATCH 0/3] Add http-check agent-hdr option

2013-04-16 Thread Simon Horman
Hi Willy, On Mon, Apr 01, 2013 at 11:29:12PM +0200, Willy Tarreau wrote: > Hi Simon, > > Sorry for the long delay and thanks for waiting. I've just reviewed your > two patch series (16 total). They're pretty good in my opinion. likewise, sorry for the delay. > I'm seeing a few points we'll prob

[PATCH 1/3] MEDIUM: Add helper for agent check events.

2013-03-17 Thread Simon Horman
Break agent check handling out of event_srv_chk_r(). This is in preparation for supporting agent check results returned in an HTTP header. Signed-off-by: Simon Horman --- src/checks.c | 97 +++--- 1 file changed, 52 insertions(+), 45

[PATCH 3/3] MEDIUM: Add http-check agent-hdr option

2013-03-17 Thread Simon Horman
Allow agent checks to obtain information in an HTTP header of the response to an http check. Signed-off-by: Simon Horman --- doc/configuration.txt | 24 -- include/types/proxy.h |2 ++ src/cfgparse.c| 38 +++-- src/checks.c | 65

[PATCH 2/3] MEDIUM: Parser to allow matching of HTTP header

2013-03-17 Thread Simon Horman
Replace the current header parser, which simply skips the headers, with a version that allows matching of a key in a header. This is in preparation for supporting agent check results returned in an HTTP header. Signed-off-by: Simon Horman --- src/checks.c | 94

[PATCH 0/3] Add http-check agent-hdr option

2013-03-17 Thread Simon Horman
the "[PATCH 00/13] checks: Add supplementary agent checks" series that I posted in late February. Simon Horman (3): MEDIUM: Add helper for agent check events. MEDIUM: Parser to allow matching of HTTP header MEDIUM: Add http-check agent-hdr option doc/configuration.txt | 24

[PATCH 13/13] MEDIUM: checks: Add supplementary agent checks

2013-02-25 Thread Simon Horman
127.0.0.1:80 check agent-port 1 The agent-inter parameter may also be used to specify the interval and timeout for agent checks. If either the health or agent check determines that a server is down then it is marked as being down, otherwise it is marked as being up. Signed-off-by: Simon Horman

[PATCH 12/13] MEDIUM: Add helper for task creation for checks

2013-02-25 Thread Simon Horman
This helper is in preparation for adding a second struct check element to struct server. Signed-off-by: Simon Horman --- src/checks.c | 47 --- 1 file changed, 28 insertions(+), 19 deletions(-) diff --git a/src/checks.c b/src/checks.c index 2a4f8fd

[PATCH 08/13] MEDIUM: Add state to struct check

2013-02-25 Thread Simon Horman
well as the server's existing check. Signed-off-by: Simon Horman --- include/types/server.h |5 - src/checks.c |8 src/dumpstats.c|2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/include/types/server.h b/include/types/server.h

<    1   2   3   4   >