HAProxy stuck on TCP Retransmission

2011-11-29 Thread Simon Schmid
eout queue 5000 timeout server 6000 timeout connect 5000 server node1 127.0.0.1:3200 weight 1 maxconn 4096 Thanks for reading! :) Simon

Backend server in maintenance mode

2011-10-14 Thread Mathieu Simon
e. I know already the way to do what I want with iptables but I'm looking for solution simpler like HATop could do. I hope my question is clear enough :) Thanks in advance! Mathieu Simon.

Re: status of master/worker model in 1.5

2011-09-27 Thread Simon Horman
On Mon, Sep 19, 2011 at 12:13:14PM -0400, Adam Kocoloski wrote: > Hi all, Simon Horman posted a patch set back in March that enabled > haproxy to reload its configuration without refusing connections. I > don't think the patches have been merged yet -- are they on track for >

RE: SNMP Perl script with Centos 6.0

2011-09-13 Thread Dwyer, Simon
Not a problem Willy. I should also note in that case that the initial error "error on subcontainer 'ia_addr' insert (-1)" Is due to the face i am using keepalived and i have an ip address without an interface. I believe its a bug in the snmp libraries for cen

RE: Stress test

2011-09-12 Thread Dwyer, Simon
Cheers, I will have a look at ab. I more just want to make sure it doesnt crash and burn while its in test. doing more of a proof of concept atm :) From: Baptiste [bed...@gmail.com] Sent: Tuesday, September 13, 2011 3:07 PM To: Dwyer, Simon Cc: haproxy

Stress test

2011-09-12 Thread Dwyer, Simon
I am trying to do some load testing on a new HA Proxy pair. Is there a common way to do this? i have done some searching but have not found anything solid. Cheers, Simon

RE: SNMP Perl script with Centos 6.0

2011-09-12 Thread Dwyer, Simon
Issue resolved. I thought i had already turn selinux to permissive. Apparently not :) From: Dwyer, Simon [sdw...@federalit.net] Sent: Tuesday, September 13, 2011 10:33 AM To: haproxy@formilux.org Subject: RE: SNMP Perl script with Centos 6.0 Ok i have

RE: SNMP Perl script with Centos 6.0

2011-09-12 Thread Dwyer, Simon
Ok i have nailed this down to its working if i fire off snmpd by hand as root but not when i run it with the init script. i am running the command by hand the same as its called in the init script so i am stuck to see a difference. Anyone have any ideas? Cheers, Simon

SNMP Perl script with Centos 6.0

2011-09-11 Thread Dwyer, Simon
ell i have everything right. Any ideas? Thanks, Simon Dwyer

Re: [PATCH 0/5] Fix stick-table replication on soft-restart

2011-08-18 Thread Simon Horman
On Thu, Aug 18, 2011 at 11:56:42PM +0200, Willy Tarreau wrote: > On Sat, Aug 13, 2011 at 08:03:47AM +0900, Simon Horman wrote: > > Hi, > > > > this series resolves a regression that prevents replication on soft-restart > > from working. It also fixes several other pr

[PATCH 3/5] [MINOR] Correct type in table dump examples

2011-08-12 Thread Simon Horman
When dumping tables the table type is displayed as a type name not an integer. --- doc/configuration.txt | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/configuration.txt b/doc/configuration.txt index ffa5c5f..14a4b84 100644 --- a/doc/configuration.txt +++

[PATCH 2/5] [MEDIUM] Correct ipmask() logic

2011-08-12 Thread Simon Horman
The netmask applied to table entries as configured using ipmask() is stored in arg_p->data.ip not arg_i (which will be 1 if the netmask is set). --- src/pattern.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/pattern.c b/src/pattern.c index e705f00..59ff010 100644 -

[PATCH 5/5] [MINOR] Use DPRINTF in assign_server()

2011-08-12 Thread Simon Horman
Use DPRINTF in assign_server() rather than open-coding its logic. --- src/backend.c |4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/src/backend.c b/src/backend.c index 2cbc888..31e29d3 100644 --- a/src/backend.c +++ b/src/backend.c @@ -471,9 +471,7 @@ int assign_server(

[PATCH 1/5] [MEDIUM] Fix stick-table replication on soft-restart

2011-08-12 Thread Simon Horman
"[MINOR] session: add a pointer to the new target into the session" (664beb8) introduced a regression by changing the type of a peer's target from TARG_TYPE_PROXY to TARG_TYPE_NONE. The effect of this is that during a soft-restart the new process no longer tries to connect to the old process to rep

[PATCH 0/5] Fix stick-table replication on soft-restart

2011-08-12 Thread Simon Horman
Hi, this series resolves a regression that prevents replication on soft-restart from working. It also fixes several other problems that I noticed along the way.

[PATCH 4/5] [MINOR] Fix build error in stream_int_register_handler()

2011-08-12 Thread Simon Horman
There is no parameter or variable fct in stream_int_register_handler() so the build fails when DPRINTF is active. --- src/stream_interface.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/stream_interface.c b/src/stream_interface.c index d4bf1b8..350a47b 100644 --- a

Re: Thoughts on the master-worker model

2011-07-28 Thread Simon Horman
Hi Willy, sorry for not responding earlier. On Mon, Jul 18, 2011 at 04:40:56PM +0200, Willy Tarreau wrote: > Hi Simon ! > > Last week I could find some time with a quiet place at work to dig again > into the master-worker patch series. > > I went back to what we discuss

[PATCH 5/6] [MINOR] Free stick table pool on denint()

2011-07-14 Thread Simon Horman
The motivation for this is that when soft-restart is merged it will be come more important to free all relevant memory in deinit() Discovered using valgrind. --- src/haproxy.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/haproxy.c b/src/haproxy.c index da9f8c6..f98

[PATCH 6/6] [MINOR] Free stick rules on denint()

2011-07-14 Thread Simon Horman
The motivation for this is that when soft-restart is merged it will be come more important to free all relevant memory in deinit() Discovered using valgrind. --- src/haproxy.c | 67 +--- 1 files changed, 54 insertions(+), 13 deletions(-) diff

[PATCH 4/6] [MINOR] Free tcp rules on denint()

2011-07-14 Thread Simon Horman
The motivation for this is that when soft-restart is merged it will be come more important to free all relevant memory in deinit() Discovered using valgrind. --- src/haproxy.c | 28 1 files changed, 28 insertions(+), 0 deletions(-) diff --git a/src/haproxy.c b/src/

[PATCH 0/6] Free memory on exit

2011-07-14 Thread Simon Horman
The motivation for this is that when soft-restart is merged it will be come more important to free all relevant memory in deinit(

[PATCH 1/6] [MINOR] Consistently use error in tcp_parse_tcp_req()

2011-07-14 Thread Simon Horman
It seems to me that without this change tcp_parse_tcp_req() may leak memory. --- src/proto_tcp.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/proto_tcp.c b/src/proto_tcp.c index cdaf150..3b6d39d 100644 --- a/src/proto_tcp.c +++ b/src/proto_tcp.c @@ -1213,7 +1213,7

[PATCH 2/6] [MINOR] Consistently free expr on error in cfg_parse_listen()

2011-07-14 Thread Simon Horman
It seems to me that without this change cfg_parse_listen() may leak memory. --- src/cfgparse.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/src/cfgparse.c b/src/cfgparse.c index 145d21f..6e38962 100644 --- a/src/cfgparse.c +++ b/src/cfgparse.c @@ -2918,6 +2918,7 @@ i

[PATCH 3/6] [MINOR] Free rdp_cookie_name on denint()

2011-07-14 Thread Simon Horman
The motivation for this is that when soft-restart is merged it will be come more important to free all relevant memory in deinit() Discovered using valgrind. --- src/haproxy.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/haproxy.c b/src/haproxy.c index 915f47a..321

Re: [PATCH] [CLEANUP] Remove unnecessary casts

2011-06-26 Thread Simon Horman
On Sat, Jun 25, 2011 at 09:13:52PM +0200, Willy Tarreau wrote: > Hi Simon, > > On Fri, Jun 24, 2011 at 03:11:37PM +0900, Simon Horman wrote: > > There is no need to cast when going to or from void * > > Sometimes the void* is used as an easy cast (this is dirty but handy)

Re: [PATCH] [MINOR] Add non-stick server option

2011-06-26 Thread Simon Horman
On Sat, Jun 25, 2011 at 09:15:59PM +0200, Willy Tarreau wrote: > Simon, I have applied all of your 4 patches. I really like the > idea behind non-stick and stick on the RDP cookie, those are nice > improvements. Thanks, I was pretty happy with how it turned out too.

[PATCH] [MINOR] Add non-stick server option

2011-06-24 Thread Simon Horman
Never add connections allocated to this sever to a stick-table. This may be used in conjunction with backup to ensure that stick-table persistence is disabled for backup servers. --- doc/configuration.txt |5 + include/types/server.h |1 + src/cfgparse.c |4 src/sessi

[PATCH] [CLEANUP] Remove unnecessary casts

2011-06-23 Thread Simon Horman
There is no need to cast when going to or from void * --- src/proto_tcp.c | 46 +++--- 1 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/proto_tcp.c b/src/proto_tcp.c index f03d3f3..a8540e4 100644 --- a/src/proto_tcp.c +++ b/src/proto_tc

[PATCH] [MINOR] Add rdp_cookie pattern fetch function

2011-06-23 Thread Simon Horman
This pattern fetch function extracts the value of the rdp cookie as a string and uses this value to match. This enables implementation of persistence based on the mstshash cookie. This is typically done if there is no msts cookie present. This differs from "balance rdp-cookie" in that any balanci

[PATCH] [MINOR] Make appsess{,ion}_refresh static

2011-06-23 Thread Simon Horman
apsession_refresh() and apsess_refressh are only used inside apsession.c and thus can be made static. The only use of apsession_refresh() is appsession_task_init(). These functions have been re-ordered to avoid the need for a forward-declaration of apsession_refresh(). --- include/common/appsessi

[PATCH 5/5] [MINOR] Add down termination condition

2011-06-21 Thread Simon Horman
If a connection is closed by because the backend became unavailable then log 'D' as the termination condition. Signed-off-by: Simon Horman v4 * Document 'D' termination condition --- doc/configuration.txt |2 ++ include/types/session.h |3 ++- src/checks.c

[PATCH 3/5] [MINOR] Add active connection list to server

2011-06-21 Thread Simon Horman
The motivation for this is to allow iteration of all the connections of a server without the expense of iterating over the global list of connections. The first use of this will be to implement an option to close connections associated with a server when is is marked as being down or in maintenanc

[PATCH 1/5] [CLEANUP] peers.h: fix declarations

2011-06-21 Thread Simon Horman
* The declaration of peer_session_create() does not match its definition. As it is only used inside of peers.c make it static. * Make the declaration of peers_register_table() match its definition. * Also, make all functions in peers.c that are not also in peers.h static --- include/prot

[PATCH 4/5] [MINOR] Allow shutdown of sessions when a server becomes unavailable

2011-06-21 Thread Simon Horman
sions unless on-marked-down shutdown-sessions is set - fixed logic bug Signed-off-by: Simon Horman --- doc/configuration.txt |9 + include/proto/session.h |4 ++-- include/types/checks.h |6 ++ include/types/server.h |1 + src/cfgparse.c |

[PATCH v4 0/5] Allow shutdown of sessions when a server becomes unavailable

2011-06-21 Thread Simon Horman
Hi, this is v3 of this series which adds an option to allow connections to be closed if their backend becomes unavailable. Changes: v4: [PATCH 5/5] [MINOR] Add down termination condition * Add documentation v3: [PATCH 4/5] [MINOR] Allow shutdown of sessions when a server becomes * Rename serv

[PATCH 2/5] [CLEANUP] session.c: Make functions static where possible

2011-06-21 Thread Simon Horman
--- include/proto/session.h |3 +- src/session.c | 68 +++--- 2 files changed, 35 insertions(+), 36 deletions(-) diff --git a/include/proto/session.h b/include/proto/session.h index 15f3fe7..c9195f6 100644 --- a/include/proto/session.h +++ b

[PATCH 2/5] [CLEANUP] session.c: Make functions static where possible

2011-06-21 Thread Simon Horman
--- include/proto/session.h |3 +- src/session.c | 68 +++--- 2 files changed, 35 insertions(+), 36 deletions(-) diff --git a/include/proto/session.h b/include/proto/session.h index 15f3fe7..c9195f6 100644 --- a/include/proto/session.h +++ b

[PATCH v3 0/4] Allow shutdown of sessions when a server becomes unavailable

2011-06-21 Thread Simon Horman
Hi, this is v3 of this series which adds an option to allow connections to be closed if their backend becomes unavailable. Changes since v2 are: [PATCH 4/5] [MINOR] Allow shutdown of sessions when a server becomes * Rename server element of session as by_srv * Don't close sessions unless on-mark

[PATCH 1/5] [CLEANUP] peers.h: fix declarations

2011-06-21 Thread Simon Horman
* The declaration of peer_session_create() does not match its definition. As it is only used inside of peers.c make it static. * Make the declaration of peers_register_table() match its definition. * Also, make all functions in peers.c that are not also in peers.h static --- include/prot

[PATCH 5/5] [MINOR] Add down termination condition

2011-06-21 Thread Simon Horman
If a connection is closed by because the backend became unavailable then log 'D' as the termination condition. Signed-off-by: Simon Horman --- include/types/session.h |3 ++- src/checks.c|1 + src/log.c |2 +- 3 files changed, 4 insertions(+), 2

[PATCH 3/5] [MINOR] Add active connection list to server

2011-06-21 Thread Simon Horman
The motivation for this is to allow iteration of all the connections of a server without the expense of iterating over the global list of connections. The first use of this will be to implement an option to close connections associated with a server when is is marked as being down or in maintenanc

[PATCH 4/5] [MINOR] Allow shutdown of sessions when a server becomes unavailable

2011-06-21 Thread Simon Horman
sions unless on-marked-down shutdown-sessions is set - fixed logic bug Signed-off-by: Simon Horman --- doc/configuration.txt |9 + include/proto/session.h |4 ++-- include/types/checks.h |6 ++ include/types/server.h |1 + src/cfgparse.c |

Re: [RFC v2 0/4] Allow shutdown of sessions when a server becomes unavailable

2011-06-15 Thread Simon Horman
On Thu, Jun 16, 2011 at 07:24:00AM +0200, Willy Tarreau wrote: > Hi Simon, > > On Thu, Jun 16, 2011 at 09:10:37AM +0900, Simon Horman wrote: > > Hi, > > > > I believed this addresses all of the issues raised with the previous > > version of this change. I have a

[PATCH 2/4] [CLEANUP] session.c: Make functions static where possible

2011-06-15 Thread Simon Horman
--- include/proto/session.h |3 +- src/session.c | 68 +++--- 2 files changed, 35 insertions(+), 36 deletions(-) diff --git a/include/proto/session.h b/include/proto/session.h index 15f3fe7..c9195f6 100644 --- a/include/proto/session.h +++ b

[PATCH 3/4] [MINOR] Add active connection list to server

2011-06-15 Thread Simon Horman
--- include/proto/session.h | 15 +++ include/types/server.h |1 + include/types/session.h |1 + src/cfgparse.c |1 + src/peers.c |2 +- src/proto_http.c|2 +- src/queue.c |3 ++- src/session.c |6 +++---

[PATCH 4/4] [MINOR] Allow shutdown of sessions when a server becomes unavailable

2011-06-15 Thread Simon Horman
--- v2 * Iterate per-server session list instead of global session list in shutdown_sessions() * Set nice level of tasks of sessions to be closed to 1024 * Use TASK_WOKEN_OTHER instead of TASK_WOKEN_RES in shutdown_sessions() As suggested by Willy Tarreau * Use list_for_each_entry_safe() inste

[RFC v2 0/4] Allow shutdown of sessions when a server becomes unavailable

2011-06-15 Thread Simon Horman
Hi, I believed this addresses all of the issues raised with the previous version of this change. I have also verified that connections are shutdown a backend is placed in maintenance mode.

[PATCH 1/4] [CLEANUP] peers.h: fix declarations

2011-06-15 Thread Simon Horman
* The declaration of peer_session_create() does not match its definition. As it is only used inside of peers.c make it static. * Make the declaration of peers_register_table() match its definition. * Also, make all functions in peers.c that are not also in peers.h static --- include/prot

Re: [PATCH] [MINOR] Allow shutdown of sessions when a server becomes unavailable

2011-06-15 Thread Simon Horman
On Wed, Jun 15, 2011 at 10:03:17PM +0200, Willy Tarreau wrote: > On Wed, Jun 15, 2011 at 05:01:32PM +0900, Simon Horman wrote: > > On Wed, Jun 08, 2011 at 10:55:44AM +0200, Willy Tarreau wrote: > > > > [snip] > > > > > Not necessarily : currently, if yo

Re: [PATCH] [MINOR] Allow shutdown of sessions when a server becomes unavailable

2011-06-15 Thread Simon Horman
On Wed, Jun 08, 2011 at 10:55:44AM +0200, Willy Tarreau wrote: [snip] > Not necessarily : currently, if you only close on the server side, the > effect will be propagated to the client side, so it already does the right > thing and at the same time will allow us to improve on this later. Hi Will

[PATCH 5/9] [MINOR] Break out all stick table socat command parsing

2011-06-14 Thread Simon Horman
This will allow reuse for clearing table entries other than by key --- src/dumpstats.c | 150 +++ 1 files changed, 73 insertions(+), 77 deletions(-) diff --git a/src/dumpstats.c b/src/dumpstats.c index bc1c2a4..6adcee2 100644 --- a/src/dumpstat

[PATCH 8/9] [MINOR] Allow showing and clearing by key of integer stick tables

2011-06-14 Thread Simon Horman
--- doc/configuration.txt |4 ++-- src/dumpstats.c | 29 - 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/doc/configuration.txt b/doc/configuration.txt index 00e83f1..1d334df 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@

[PATCH 7/9] [MINOR] Allow showing and clearing by key of ipv6 stick tables

2011-06-14 Thread Simon Horman
--- doc/configuration.txt |4 ++-- src/dumpstats.c | 16 +++- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/doc/configuration.txt b/doc/configuration.txt index 538be58..00e83f1 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -9345,7 +9345

[PATCH 6/9] [MINOR] More flexible clearing of stick table

2011-06-14 Thread Simon Horman
* Allow clearing of all entries of a table * Allow clearing of all entries of a table that match a data filter --- doc/configuration.txt | 47 include/proto/dumpstats.h |1 + src/dumpstats.c | 41 ++---

[PATCH 9/9] [MINOR] Allow showing and clearing by key of string stick tables

2011-06-14 Thread Simon Horman
--- doc/configuration.txt |6 -- src/dumpstats.c |4 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/doc/configuration.txt b/doc/configuration.txt index 1d334df..7dfa2b1 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -9345,7 +9345,8 @@ clear

[PATCH 2/9] [MINOR] Break out dumping table

2011-06-14 Thread Simon Horman
This will allow the code to be reused for showing a table filtered by key Signed-off-by: Simon Horman --- src/dumpstats.c | 315 +-- 1 files changed, 165 insertions(+), 150 deletions(-) diff --git a/src/dumpstats.c b/src/dumpstats.c index

[PATCH 1/9] [CLEANUP] dumpstats: make symbols static where possible

2011-06-14 Thread Simon Horman
--- include/proto/dumpstats.h |9 - src/dumpstats.c | 38 -- 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/include/proto/dumpstats.h b/include/proto/dumpstats.h index 89e656e..850819a 100644 --- a/include/proto/dumpstat

[PATCH 4/9] [MINOR] Allow listing of stick table by key

2011-06-14 Thread Simon Horman
--- doc/configuration.txt | 26 -- src/dumpstats.c | 32 +--- 2 files changed, 45 insertions(+), 13 deletions(-) diff --git a/doc/configuration.txt b/doc/configuration.txt index b788c13..5455f7c 100644 --- a/doc/configuration.txt +++ b

[PATCH 0/9] Enhance show/clear table socat commands

2011-06-14 Thread Simon Horman
Hi, This patch series unifies the arguments taken by the show table and clear table socat commands by allowing: * show table key * clear table data. It also allows non IPv4 keys to be used.

[PATCH 3/9] [MINOR] Break out processing of clear table

2011-06-14 Thread Simon Horman
This will allow the code to be reused for showing a table filtered by key --- src/dumpstats.c | 126 +-- 1 files changed, 66 insertions(+), 60 deletions(-) diff --git a/src/dumpstats.c b/src/dumpstats.c index 309651d..e99153a 100644 --- a/src/d

Re: [PATCH] [MINOR] Allow shutdown of sessions when a server becomes unavailable

2011-06-08 Thread Simon Horman
On Wed, Jun 08, 2011 at 10:55:44AM +0200, Willy Tarreau wrote: > On Wed, Jun 08, 2011 at 05:00:44PM +0900, Simon Horman wrote: > > I'm happy with documenting things as you suggest. > > Fine. > > > Do you have any feeling of how difficult it would be > > to add

Re: [PATCH] [MINOR] Allow shutdown of sessions when a server becomes unavailable

2011-06-08 Thread Simon Horman
On Wed, Jun 08, 2011 at 07:32:29AM +0200, Willy Tarreau wrote: > Hi Simon, > > On Wed, Jun 08, 2011 at 09:55:21AM +0900, Simon Horman wrote: > (...) > > I should note that I'm not entirely sure about the performance implications > > of looping through all sessions li

Re: [PATCH] [MINOR] Allow shutdown of sessions when a server becomes unavailable

2011-06-07 Thread Simon Horman
On Wed, Jun 08, 2011 at 09:19:21AM +0900, Simon Horman wrote: > --- > doc/configuration.txt |9 + > include/types/checks.h |6 ++ > include/types/server.h |1 + > src/cfgparse.c | 14 +- > src/checks.c | 22 +

[PATCH] [MINOR] Allow shutdown of sessions when a server becomes unavailable

2011-06-07 Thread Simon Horman
--- doc/configuration.txt |9 + include/types/checks.h |6 ++ include/types/server.h |1 + src/cfgparse.c | 14 +- src/checks.c | 22 ++ 5 files changed, 51 insertions(+), 1 deletions(-) diff --git a/doc/configuration.

[PATCH] [CLEANUP] session.c: Make functions static where possible

2011-06-07 Thread Simon Horman
--- include/proto/session.h |3 +- src/session.c | 68 +++--- 2 files changed, 35 insertions(+), 36 deletions(-) diff --git a/include/proto/session.h b/include/proto/session.h index 15f3fe7..c9195f6 100644 --- a/include/proto/session.h +++ b

[PATCH] [CLEANUP] peers.h: fix declarations

2011-06-07 Thread Simon Horman
* The declaration of peer_session_create() does not match its definition. As it is only used inside of peers.c make it static. * Make the declaration of peers_register_table() match its definition. * Also, make all functions in peers.c that are not also in peers.h static --- include/prot

[PATCH] [CLEANUP] Remove assigned but unused variables

2011-06-06 Thread Simon Horman
--- gcc (Debian 4.6.0-2) 4.6.1 20110329 (prerelease) Copyright (C) 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ... src/proto_http.c:3029:14: warning: vari

[PATCH] [DOC] Minor spelling fixes and grammatical enhancements

2011-05-28 Thread Simon Horman
--- doc/configuration.txt | 22 +++--- 1 files changed, 11 insertions(+), 11 deletions(-) diff --git a/doc/configuration.txt b/doc/configuration.txt index 2cac152..c074ed4 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -7839,7 +7839,7 @@ The list of currently

Re: [GIT PULL horms-rebased7] pidfile fixes

2011-04-12 Thread Simon Horman
On Wed, Apr 13, 2011 at 07:39:19AM +0200, Willy Tarreau wrote: > Hi Simon, > > On Wed, Apr 13, 2011 at 02:33:23PM +0900, Simon Horman wrote: > > Hi Willy, > > > > While looking over the horms-rebased7 branch of > > http://git.1wt.eu/git/haproxy.git/ I noti

[PATCH 2/2] Always use the pidfile returned by prepare()

2011-04-12 Thread Simon Horman
prepare() will open and truncate pidfile if a pid file is to be used. This is a bug which is a hangover from factoring out changes to keep the pidfile open in master processes. Signed-off-by: Simon Horman --- src/haproxy.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff

[PATCH 1/2] Close pidfile when it is no longer needed.

2011-04-12 Thread Simon Horman
There is no need to keep the pidfile open in non-master processes. Signed-off-by: Simon Horman --- src/haproxy.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/src/haproxy.c b/src/haproxy.c index 8780714..46e4ae9 100644 --- a/src/haproxy.c +++ b/src/haproxy.c

[GIT PULL horms-rebased7] pidfile fixes

2011-04-12 Thread Simon Horman
2d83c: Teach socket_cache about wildcard addresses (2011-04-05 23:01:51 +0200) are available in the git repository at: git://github.com/horms/haproxy.git horms-rebased7 Simon Horman (3): Only write pid file once on startup Close pidfile when it is no longer needed. Always us

Re: [PATCH 0/7] Master/Worker Enhancements

2011-03-27 Thread Simon Horman
On Mon, Mar 28, 2011 at 07:54:16AM +0200, Willy Tarreau wrote: > On Mon, Mar 28, 2011 at 02:45:36PM +0900, Simon Horman wrote: > > On Mon, Mar 28, 2011 at 07:29:12AM +0200, Willy Tarreau wrote: > > > Hi Simon, > > > > > > On Mon, Mar 28, 2011 at 08:49:00AM +

Re: [PATCH 0/7] Master/Worker Enhancements

2011-03-27 Thread Simon Horman
On Mon, Mar 28, 2011 at 07:29:12AM +0200, Willy Tarreau wrote: > Hi Simon, > > On Mon, Mar 28, 2011 at 08:49:00AM +0900, Simon Horman wrote: > > Hi, > > > > here is my latest round of patches for the master/worker code > > that I have been working on to allo

[PATCH 7/7] Teach socket_cache about wildcard addresses

2011-03-27 Thread Simon Horman
. Signed-off-by: Simon Horman --- src/fd.c | 67 + 1 files changed, 58 insertions(+), 9 deletions(-) diff --git a/src/fd.c b/src/fd.c index c2f16bb..2d102c4 100644 --- a/src/fd.c +++ b/src/fd.c @@ -232,22 +232,60 @@ static int

[PATCH 6/7] Run master outside of chroot

2011-03-27 Thread Simon Horman
to allow any errors to be recoverable from a soft-restart point of view. Soft-restart is not currently implemented for master/worker mode. Signed-off-by: Simon Horman --- src/haproxy.c | 46 +- 1 files changed, 33 insertions(+), 13 deletions(-) diff

[PATCH 5/7] Add post()

2011-03-27 Thread Simon Horman
post() contains code to be run after all necessary processes have been forked. It includes code that will be run even if no processes are forked. It will be expanded by changes to facilitate the master process running outside the chroot. Signed-off-by: Simon Horman --- src/haproxy.c | 14

[PATCH 4/7] Run master as a privileged process

2011-03-27 Thread Simon Horman
t;Use CAP_NET_BIND_SERVICE and CAP_SYS_RESOURCE"). Signed-off-by: Simon Horman --- Makefile |8 -- src/haproxy.c | 75 +++- 2 files changed, 10 insertions(+), 73 deletions(-) diff --git a/Makefile b/Makefile index c532f3f..6d3f

[PATCH 1/7] Remove duplicate call to socket_cache_make_all_available()

2011-03-27 Thread Simon Horman
socket_cache_make_all_available() is also called in init() Signed-off-by: Simon Horman --- src/haproxy.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/src/haproxy.c b/src/haproxy.c index 6dd24c3..a84ef49 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -1168,8

[PATCH 3/7] Reap any children that exited during master restart

2011-03-27 Thread Simon Horman
* Initialised sig_reaper before workers are forked so that it will reap them in they case where they exit very early on Signed-off-by: Simon Horman --- src/haproxy.c | 35 ++- 1 files changed, 22 insertions(+), 13 deletions(-) diff --git a/src/haproxy.c b/src/haproxy.c

[PATCH 0/7] Master/Worker Enhancements

2011-03-27 Thread Simon Horman
Hi, here is my latest round of patches for the master/worker code that I have been working on to allow haproxy to be restarted without dropping or refusing connections to existing proxies if possible. These patches are available at git://github.com/horms/haproxy.git master They apply on

[PATCH 2/7] Reset replacing_workers in create_processes()

2011-03-27 Thread Simon Horman
This reduces the size of main() ever so slightly Signed-off-by: Simon Horman --- src/haproxy.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/src/haproxy.c b/src/haproxy.c index a84ef49..7f58a43 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -1517,6 +1517,7

[PATCH 2/3] Reuse sig_soft_stop() in sig_restart()

2011-03-14 Thread Simon Horman
Avoids a small amount of code duplication. --- src/haproxy.c |5 + 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/src/haproxy.c b/src/haproxy.c index 42d055c..fa740ff 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -296,11 +296,8 @@ void sig_restart(struct sig_handler *sh

[PATCH 3/3] Moving pinging of master into a task

2011-03-14 Thread Simon Horman
Instead of checking that the master still exists every time the main loop loops do so once per second. This should reduce load when there is a lot of activity. --- src/haproxy.c | 37 ++--- 1 files changed, 26 insertions(+), 11 deletions(-) diff --git a/src/hapro

[PATCH 0/3] Moving pinging of master into a task

2011-03-14 Thread Simon Horman
.com/horms/haproxy.git master Simon Horman (3): Move child code out of fork loop Reuse sig_soft_stop() in sig_restart() Moving pinging of master into a task src/haproxy.c | 60 ++-- 1 files changed, 36 insertions(+), 24 deletions(-)

[PATCH 1/3] Move child code out of fork loop

2011-03-14 Thread Simon Horman
This does nothing other than move code somewhere where less indentation is required. This is to make things more readable once more code is added. --- src/haproxy.c | 22 +++--- 1 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/haproxy.c b/src/haproxy.c index 7

Re: [PATCH 00/26] Restart of haproxy without dropping connections

2011-03-13 Thread Simon Horman
On Mon, Mar 14, 2011 at 12:37:17AM +0100, Willy Tarreau wrote: > On Mon, Mar 14, 2011 at 07:26:30AM +0900, Simon Horman wrote: > > Unfortunately I'm not sure of a good alternative to re-opening the file. > > Keeping the fd open would be way to fragile as editors often > >

Re: [PATCH 0/1] Disable master_worker if -d is specified on the command line

2011-03-13 Thread Simon Horman
I have added this patch to git://github.com/horms/haproxy.git master On Mon, Mar 14, 2011 at 07:08:45AM +0900, Simon Horman wrote: > --- > > This applies on top of the "[PATCH 00/26] Restart of haproxy without > dropping connections" series that I posted last week.

Re: [PATCH 00/26] Restart of haproxy without dropping connections

2011-03-13 Thread Simon Horman
On Sun, Mar 13, 2011 at 11:16:33PM +0100, Willy Tarreau wrote: > Hi Simon, > > On Mon, Mar 14, 2011 at 07:05:22AM +0900, Simon Horman wrote: > > > But if it's in the chroot, it can't reread is configuration file. > > > > True, I have a slightly dubious wa

[PATCH] Disable master_worker if -d is specified on the command line

2011-03-13 Thread Simon Horman
--- src/haproxy.c |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/haproxy.c b/src/haproxy.c index 94adcf9..7ff1e82 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -707,9 +707,12 @@ void init(int argc, char **argv) MODE_VERB

[PATCH 0/1] Disable master_worker if -d is specified on the command line

2011-03-13 Thread Simon Horman
--- This applies on top of the "[PATCH 00/26] Restart of haproxy without dropping connections" series that I posted last week. It makes no sense without that series.

Re: [PATCH 00/26] Restart of haproxy without dropping connections

2011-03-13 Thread Simon Horman
On Fri, Mar 11, 2011 at 06:55:57AM +0100, Willy Tarreau wrote: > On Fri, Mar 11, 2011 at 08:36:49AM +0900, Simon Horman wrote: > > As it stands the master needs the entire configuration as it actually > > starts all the proxies and then forks the workers. This is in order to >

Re: [PATCH 00/26] Restart of haproxy without dropping connections

2011-03-10 Thread Simon Horman
On Thu, Mar 10, 2011 at 09:40:44PM +0100, Willy Tarreau wrote: > On Thu, Mar 10, 2011 at 05:40:19PM +0900, Simon Horman wrote: > > > I think that a failure to restart smoothly means that the admin will > > > have to take the decision to restart harder (-sf/-st). Sometimes the

Re: [PATCH 00/26] Restart of haproxy without dropping connections

2011-03-10 Thread Simon Horman
On Thu, Mar 10, 2011 at 08:46:20AM +0100, Willy Tarreau wrote: > On Thu, Mar 10, 2011 at 03:52:58PM +0900, Simon Horman wrote: > > > Wow, I'm impressed, you managed to do that really quickly ! > > > > Thanks. Its taken quite a bit of effort to get this far. &g

Re: [PATCH 00/26] Restart of haproxy without dropping connections

2011-03-09 Thread Simon Horman
Hi Willy, On Thu, Mar 10, 2011 at 07:29:11AM +0100, Willy Tarreau wrote: > Hi Simon, > > On Thu, Mar 10, 2011 at 01:32:42PM +0900, Simon Horman wrote: > > Hi, > > > > this patch series attempts to allow haproxy to be restarted - perhaps > > reconfigured would be

Re: [PATCH 00/26] Restart of haproxy without dropping connections

2011-03-09 Thread Simon Horman
On Thu, Mar 10, 2011 at 01:32:42PM +0900, Simon Horman wrote: > Hi, > > this patch series attempts to allow haproxy to be restarted - perhaps > reconfigured would be a better term - without refusing or dropping > connections. > > The model that I am using is that of a ma

[PATCH 23/26] Break out process creation

2011-03-09 Thread Simon Horman
Break out the portion of run() that forks processes into create_processes() and move the remainder of run() back into main(). This increases readability by 1) reducing the indentation of almost all of the code in create_processes() 2) Removing the arbitrary split between run() and main(). It wa

[PATCH 24/26] Write pidfile after spawning all workers

2011-03-09 Thread Simon Horman
This is to allow the pidfile to be more easily rewritten if the pid a worker changes --- src/haproxy.c | 19 ++- 1 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/haproxy.c b/src/haproxy.c index 35ee06e..c33c072 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@

[PATCH 19/26] Add restart (-sr)

2011-03-09 Thread Simon Horman
This works similarly to -sf and -st except that rather than terminating processes and then starting a new haproxy instance is requests a restart and then exits. --- src/haproxy.c | 17 ++--- 1 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/haproxy.c b/src/haproxy.c

[PATCH 26/26] Restart children if they disappear

2011-03-09 Thread Simon Horman
--- src/haproxy.c | 117 1 files changed, 92 insertions(+), 25 deletions(-) diff --git a/src/haproxy.c b/src/haproxy.c index 0187f47..94adcf9 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -138,6 +138,7 @@ struct global global_default =

<    1   2   3   4   5   >