-off-by: Simon Horman ho...@verge.net.au
---
src/server.c | 11 ---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/server.c b/src/server.c
index 4c1762f..98a9fbe 100644
--- a/src/server.c
+++ b/src/server.c
@@ -164,7 +164,8 @@ const char
Allow relative weights greater than 100%,
capping the absolute value to 256 which is
the largest supported absolute weight.
Signed-off-by: Simon Horman ho...@verge.net.au
---
doc/configuration.txt | 25 +
src/server.c |7 ++-
2 files changed, 19
.
option lb-agent-chk
server http1_1 10.0.0.10:80 check port 1 weight 100
Signed-off-by: Simon Horman ho...@verge.net.au
---
v2
* Rebase
- Use server_parse_weight_change_request() instead of
process_weight_change_request() and description returned
on error.
* Remove disable
On Fri, Feb 01, 2013 at 08:22:24AM +0100, Willy Tarreau wrote:
Hi Simon,
On Fri, Feb 01, 2013 at 01:56:01PM +0900, Simon Horman wrote:
Hi Malcolm, Hi Willy,
after a bit of a hiatus I'd like to restart this discussion.
Cool, I wanted to ping you on this last week-end but forgot to do
On Mon, Dec 24, 2012 at 07:58:13AM +0100, Willy Tarreau wrote:
Hi Simon,
I have some minor comments below for this patch :
On Mon, Dec 24, 2012 at 10:33:54AM +0900, Simon Horman wrote:
+static int stats_sock_parse_weight_change_request(struct stream_interface
*si
On Mon, Dec 24, 2012 at 07:58:52AM +0100, Willy Tarreau wrote:
On Mon, Dec 24, 2012 at 10:33:55AM +0900, Simon Horman wrote:
{px-lbprm.algo BE_LB_PROP_DYN) is checked by
the immediate outer if clause, so there is no need
to check it a second time.
Good catch, this one could be merged
Hi Malcolm, Hi Willy,
after a bit of a hiatus I'd like to restart this discussion.
On Mon, Dec 24, 2012 at 10:23:15AM +0100, Willy Tarreau wrote:
Hi Malcolm,
On Mon, Dec 24, 2012 at 09:06:25AM +, Malcolm Turnbull wrote:
Willy / Simon,
I'm very happy to add a down option, my
://github.com/horms/haproxy.git dynamic-chk
for you to fetch changes up to 6ee39106a01194656240fc0d1f8b651f:
dynamic health check (2012-12-24 10:25:08 +0900)
Simon Horman (5):
dumpstats: Make cli_release_handler() static
Make cli_release_handler() static, it is only used
inside dumpstats.c
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 24de6d0..c79b1d6 100644
--- a/src/dumpstats.c
{px-lbprm.algo BE_LB_PROP_DYN) is checked by
the immediate outer if clause, so there is no need
to check it a second time.
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
Allow relative weights greater than 100%,
capping the absolute value to 256 which is
the largest supported absolute weight.
Signed-off-by: Simon Horman ho...@verge.net.au
---
doc/configuration.txt | 25 +
src/dumpstats.c |7 ++-
2 files changed, 19
Break out set weight processing code.
This is in preparation for reusing the code.
Signed-off-by: Simon Horman ho...@verge.net.au
---
include/proto/dumpstats.h |1 +
src/dumpstats.c | 146 ++---
2 files changed, 87 insertions(+), 60
to the port of the service,
may be useful in conjunction with this option.
e.g.
option dynamic-chk
server http1_1 10.0.0.10:80 check port 1 weight 100
Signed-off-by: Simon Horman ho...@verge.net.au
---
include/types/peers.h |1 +
include/types/proxy.h |3 ++-
src/cfgparse.c
---
include/types/checks.h |4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/types/checks.h b/include/types/checks.h
index a414630..fd15c95 100644
--- a/include/types/checks.h
+++ b/include/types/checks.h
@@ -19,7 +19,7 @@ enum {
/* Below we have finished
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
the 1.5 release
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
[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
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
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
+++
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 discussed a few weeks ago concerning
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 @@
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
The motivation for this is that when soft-restart is merged
it will be come more important to free all relevant memory in deinit(
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
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
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(-)
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.
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).
This was the case here
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
+++
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
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().
---
This pattern fetch function extracts the value of the rdp cookie name 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
If a connection is closed by because the backend became unavailable
then log 'D' as the termination condition.
Signed-off-by: Simon Horman ho...@verge.net.au
---
include/types/session.h |3 ++-
src/checks.c|1 +
src/log.c |2 +-
3 files changed, 4 insertions
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
unless on-marked-down shutdown-sessions is set
- fixed logic bug
Signed-off-by: Simon Horman ho...@verge.net.au
---
doc/configuration.txt |9 +
include/proto/session.h |4 ++--
include/types/checks.h |6 ++
include/types/server.h |1 +
src/cfgparse.c
* 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
---
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
---
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
+++
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
---
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
+++
unless on-marked-down shutdown-sessions is set
- fixed logic bug
Signed-off-by: Simon Horman ho...@verge.net.au
---
doc/configuration.txt |9 +
include/proto/session.h |4 ++--
include/types/checks.h |6 ++
include/types/server.h |1 +
src/cfgparse.c
If a connection is closed by because the backend became unavailable
then log 'D' as the termination condition.
Signed-off-by: Simon Horman ho...@verge.net.au
v4
* Document 'D' termination condition
---
doc/configuration.txt |2 ++
include/types/session.h |3 ++-
src/checks.c
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.
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
---
---
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
+++
---
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
---
This will allow the code to be reused
for showing a table filtered by key
Signed-off-by: Simon Horman ho...@verge.net.au
---
src/dumpstats.c | 315 +--
1 files changed, 165 insertions(+), 150 deletions(-)
diff --git a/src/dumpstats.c b/src
---
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 @@
---
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
* 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
---
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
@@
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
---
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 Willy,
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 you only close on the server side, the
effect
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.
* 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
---
---
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()
---
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
+++
---
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 +++---
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 also verified that connections are shutdown
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 a per-server session list
* 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/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
+++
---
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
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 ++
5 files
---
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:
---
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
:
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 use
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 ho...@verge.net.au
---
src/haproxy.c |6 +++---
1 files changed, 3 insertions(+), 3
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 +0900, Simon Horman wrote:
Hi,
here
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
This reduces the size of main() ever so slightly
Signed-off-by: Simon Horman ho...@verge.net.au
---
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
socket_cache_make_all_available() is also called in init()
Signed-off-by: Simon Horman ho...@verge.net.au
---
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
* 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 ho...@verge.net.au
---
src/haproxy.c | 35 ++-
1 files changed, 22 insertions(+), 13 deletions(-)
diff --git a/src
CAP_NET_BIND_SERVICE and CAP_SYS_RESOURCE).
Signed-off-by: Simon Horman ho...@verge.net.au
---
Makefile |8 --
src/haproxy.c | 75 +++-
2 files changed, 10 insertions(+), 73 deletions(-)
diff --git a/Makefile b/Makefile
index c532f3f
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 ho...@verge.net.au
---
src
.
Signed-off-by: Simon Horman ho...@verge.net.au
---
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
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 allow haproxy to be restarted without
dropping
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
/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(-)
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
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
---
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)
---
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.
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 way to deal with that.
After chrooting
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.
It makes no sense without
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
create a new file rather than
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.
I have no doubt about
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
scripts will do
In the master/worker the workers will be child processes of the master
and should be reaped after they exit.
---
src/haproxy.c | 11 +++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/src/haproxy.c b/src/haproxy.c
index 3fe8889..99d8c0d 100644
--- a/src/haproxy.c
+++
When a socket is closed, typically because a proxy is deleted,
don't close the file descriptor. Rather keep a cache which can
be looked-up and used when a subsequent proxy is started.
The aim is to avoid unbinding and binding to ports and thus
interrupting services unnecessarily. This will be
---
include/proto/log.h | 12
src/log.c | 35 ---
2 files changed, 40 insertions(+), 7 deletions(-)
diff --git a/include/proto/log.h b/include/proto/log.h
index f2ecf0b..45bec88 100644
--- a/include/proto/log.h
+++ b/include/proto/log.h
This is in preparation for adding Master/Worker mode
---
src/haproxy.c |3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/haproxy.c b/src/haproxy.c
index 99d8c0d..1f02902 100644
--- a/src/haproxy.c
+++ b/src/haproxy.c
@@ -136,6 +136,9 @@ struct global global = {
This will allow new logging configuration to take effect
once changes to reinitialise haproxy are introduced.
---
include/proto/log.h |5 +
src/haproxy.c |1 +
src/log.c | 17 ++---
3 files changed, 20 insertions(+), 3 deletions(-)
diff --git
---
src/haproxy.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/haproxy.c b/src/haproxy.c
index dc2739b..8c9053f 100644
--- a/src/haproxy.c
+++ b/src/haproxy.c
@@ -1131,6 +1131,7 @@ void run(int argc, char **argv)
}
chdir(/);
---
src/ev_epoll.c |2 +-
src/ev_kqueue.c |1 -
src/ev_poll.c |1 -
src/ev_select.c |1 -
src/ev_sepoll.c |4 +++-
5 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/ev_epoll.c b/src/ev_epoll.c
index b976868..f55a382 100644
--- a/src/ev_epoll.c
+++
If is_master is set then the configuration is being
read as part a reinitialisation. And as such it seems
reasonable to ignore errors when resolving users and groups -
if they are unchanged from the original configuration then
they will already be set, and otherwise they may not be settable
as the
This allows chroot to occur before setsid_early().
In the case where a master process is re-initialised
* It will not chroot itself, though if it is already chrooted that will
remain in effect.
* If it is already chrooted then the path to the configuration file
read during reinitialisation
If worker/master mode is active and the master process receives
a SIGUSR2 then it will restart haproxy by re-reading the configuration file,
killing existing workers and starting new workers.
SIGUSR2 is ignored if worker/master mode is not active.
SIGUSR2 is ignored by worker processes.
---
If master/worker mode is active then there will be multiple processes
present and as such it is useful to know the relevant pids.
This also splits run() up into two parts which will aid later
refactoring.
---
src/haproxy.c | 43 +++
1 files changed, 27
201 - 300 of 309 matches
Mail list logo