Re: [RFC][PATCHES] seamless reload

2017-05-26 Thread Willy Tarreau
Hi William, On Sat, May 27, 2017 at 12:08:38AM +0200, William Lallemand wrote: > The attached patches provide the "expose-fd listeners" stats socket option and > remove the "no-unused-socket" global option. > > It behaves exactly has Willy explain above minus the master process :-) > > ps:

Re: [RFC][PATCHES] seamless reload

2017-05-26 Thread William Lallemand
Hi guys, On Fri, May 12, 2017 at 04:26:01PM +0200, Willy Tarreau wrote: > In fact William is currently working on the master-worker model to get rid > of the systemd-wrapper and found some corner cases between this and your > patchset. Nothing particularly difficult, just the fact that he'll need

Re: [RFC][PATCHES] seamless reload

2017-05-12 Thread Willy Tarreau
Hi Pavlos, Olivier, On Mon, May 08, 2017 at 02:34:05PM +0200, Olivier Houchard wrote: > Hi Pavlos, > > On Sun, May 07, 2017 at 12:05:28AM +0200, Pavlos Parissis wrote: > [...] > > Ignore ignore what I wrote, I am an idiot I am an idiot as I forgot the most > > important bit of the test, to

Re: [RFC][PATCHES] seamless reload

2017-05-08 Thread Olivier Houchard
Hi Pavlos, On Sun, May 07, 2017 at 12:05:28AM +0200, Pavlos Parissis wrote: [...] > Ignore ignore what I wrote, I am an idiot I am an idiot as I forgot the most > important bit of the test, to enable the seamless reload by suppling the > HAPROXY_STATS_SOCKET environment variable:-( > > I added

Re: [RFC][PATCHES] seamless reload

2017-05-06 Thread Pavlos Parissis
On 06/05/2017 11:15 μμ, Pavlos Parissis wrote: > On 04/05/2017 01:16 μμ, Olivier Houchard wrote: >> On Thu, May 04, 2017 at 10:03:07AM +, Pierre Cheynier wrote: >>> Hi Olivier, >>> >>> Many thanks for that ! As you know, we are very interested on this topic. >>> We'll test your patches soon

Re: [RFC][PATCHES] seamless reload

2017-05-06 Thread Pavlos Parissis
On 04/05/2017 01:16 μμ, Olivier Houchard wrote: > On Thu, May 04, 2017 at 10:03:07AM +, Pierre Cheynier wrote: >> Hi Olivier, >> >> Many thanks for that ! As you know, we are very interested on this topic. >> We'll test your patches soon for sure. >> >> Pierre > > Hi Pierre :) > > Thanks !

Re: [RFC][PATCHES] seamless reload

2017-05-04 Thread Olivier Houchard
On Thu, May 04, 2017 at 10:03:07AM +, Pierre Cheynier wrote: > Hi Olivier, > > Many thanks for that ! As you know, we are very interested on this topic. > We'll test your patches soon for sure. > > Pierre Hi Pierre :) Thanks ! I'm very interested in knowing how well it works for you. Maybe

RE: [RFC][PATCHES] seamless reload

2017-05-04 Thread Pierre Cheynier
Hi Olivier, Many thanks for that ! As you know, we are very interested on this topic. We'll test your patches soon for sure. Pierre

Re: [RFC][PATCHES] seamless reload

2017-04-19 Thread Olivier Houchard
On Wed, Apr 19, 2017 at 09:58:27AM +0200, Pavlos Parissis wrote: > On 13/04/2017 06:18 μμ, Olivier Houchard wrote: > > On Thu, Apr 13, 2017 at 06:00:59PM +0200, Conrad Hoffmann wrote: > >> On 04/13/2017 05:10 PM, Olivier Houchard wrote: > >>> On Thu, Apr 13, 2017 at 04:59:26PM +0200, Conrad

Re: [RFC][PATCHES] seamless reload

2017-04-19 Thread Pavlos Parissis
On 13/04/2017 06:18 μμ, Olivier Houchard wrote: > On Thu, Apr 13, 2017 at 06:00:59PM +0200, Conrad Hoffmann wrote: >> On 04/13/2017 05:10 PM, Olivier Houchard wrote: >>> On Thu, Apr 13, 2017 at 04:59:26PM +0200, Conrad Hoffmann wrote: Sure, here it is ;P I now get a segfault (on

Re: [RFC][PATCHES] seamless reload

2017-04-14 Thread Willy Tarreau
On Thu, Apr 13, 2017 at 06:18:59PM +0200, Olivier Houchard wrote: > > Once more, thank you so much! This will greatly simplify much of our > > operations. If there is anything else we can help test, let me know :) > > Pfew, at least :) Thanks a lot for your patience, and doing all that testing !

Re: [RFC][PATCHES] seamless reload

2017-04-13 Thread Olivier Houchard
On Thu, Apr 13, 2017 at 06:00:59PM +0200, Conrad Hoffmann wrote: > On 04/13/2017 05:10 PM, Olivier Houchard wrote: > > On Thu, Apr 13, 2017 at 04:59:26PM +0200, Conrad Hoffmann wrote: > >> Sure, here it is ;P > >> > >> I now get a segfault (on reload): > >> > >> *** Error in `/usr/sbin/haproxy':

Re: [RFC][PATCHES] seamless reload

2017-04-13 Thread Conrad Hoffmann
On 04/13/2017 05:10 PM, Olivier Houchard wrote: > On Thu, Apr 13, 2017 at 04:59:26PM +0200, Conrad Hoffmann wrote: >> Sure, here it is ;P >> >> I now get a segfault (on reload): >> >> *** Error in `/usr/sbin/haproxy': corrupted double-linked list: >> 0x05b511e0 *** >> >> Here is the

Re: [RFC][PATCHES] seamless reload

2017-04-13 Thread Olivier Houchard
On Thu, Apr 13, 2017 at 04:59:26PM +0200, Conrad Hoffmann wrote: > Sure, here it is ;P > > I now get a segfault (on reload): > > *** Error in `/usr/sbin/haproxy': corrupted double-linked list: > 0x05b511e0 *** > > Here is the backtrace, retrieved from the core file: > > (gdb) bt > #0

Re: [RFC][PATCHES] seamless reload

2017-04-13 Thread Conrad Hoffmann
On 04/13/2017 03:50 PM, Olivier Houchard wrote: > On Thu, Apr 13, 2017 at 03:06:47PM +0200, Conrad Hoffmann wrote: >> >> >> On 04/13/2017 02:28 PM, Olivier Houchard wrote: >>> On Thu, Apr 13, 2017 at 12:59:38PM +0200, Conrad Hoffmann wrote: On 04/13/2017 11:31 AM, Olivier Houchard wrote:

Re: [RFC][PATCHES] seamless reload

2017-04-13 Thread Olivier Houchard
On Thu, Apr 13, 2017 at 03:06:47PM +0200, Conrad Hoffmann wrote: > > > On 04/13/2017 02:28 PM, Olivier Houchard wrote: > > On Thu, Apr 13, 2017 at 12:59:38PM +0200, Conrad Hoffmann wrote: > >> On 04/13/2017 11:31 AM, Olivier Houchard wrote: > >>> On Thu, Apr 13, 2017 at 11:17:45AM +0200, Conrad

Re: [RFC][PATCHES] seamless reload

2017-04-13 Thread Conrad Hoffmann
On 04/13/2017 02:28 PM, Olivier Houchard wrote: > On Thu, Apr 13, 2017 at 12:59:38PM +0200, Conrad Hoffmann wrote: >> On 04/13/2017 11:31 AM, Olivier Houchard wrote: >>> On Thu, Apr 13, 2017 at 11:17:45AM +0200, Conrad Hoffmann wrote: Hi Olivier, On 04/12/2017 06:09 PM, Olivier

Re: [RFC][PATCHES] seamless reload

2017-04-13 Thread Olivier Houchard
On Thu, Apr 13, 2017 at 12:59:38PM +0200, Conrad Hoffmann wrote: > On 04/13/2017 11:31 AM, Olivier Houchard wrote: > > On Thu, Apr 13, 2017 at 11:17:45AM +0200, Conrad Hoffmann wrote: > >> Hi Olivier, > >> > >> On 04/12/2017 06:09 PM, Olivier Houchard wrote: > >>> On Wed, Apr 12, 2017 at

Re: [RFC][PATCHES] seamless reload

2017-04-13 Thread Conrad Hoffmann
On 04/13/2017 11:31 AM, Olivier Houchard wrote: > On Thu, Apr 13, 2017 at 11:17:45AM +0200, Conrad Hoffmann wrote: >> Hi Olivier, >> >> On 04/12/2017 06:09 PM, Olivier Houchard wrote: >>> On Wed, Apr 12, 2017 at 05:50:54PM +0200, Olivier Houchard wrote: On Wed, Apr 12, 2017 at 05:30:17PM

Re: [RFC][PATCHES] seamless reload

2017-04-13 Thread Olivier Houchard
On Thu, Apr 13, 2017 at 11:17:45AM +0200, Conrad Hoffmann wrote: > Hi Olivier, > > On 04/12/2017 06:09 PM, Olivier Houchard wrote: > > On Wed, Apr 12, 2017 at 05:50:54PM +0200, Olivier Houchard wrote: > >> On Wed, Apr 12, 2017 at 05:30:17PM +0200, Conrad Hoffmann wrote: > >>> Hi again, > >>> >

Re: [RFC][PATCHES] seamless reload

2017-04-13 Thread Conrad Hoffmann
Hi Olivier, On 04/12/2017 06:09 PM, Olivier Houchard wrote: > On Wed, Apr 12, 2017 at 05:50:54PM +0200, Olivier Houchard wrote: >> On Wed, Apr 12, 2017 at 05:30:17PM +0200, Conrad Hoffmann wrote: >>> Hi again, >>> >>> so I tried to get this to work, but didn't manage yet. I also don't quite >>>

Re: [RFC][PATCHES] seamless reload

2017-04-13 Thread Willy Tarreau
On Wed, Apr 12, 2017 at 07:41:43PM +0200, Olivier Houchard wrote: > + if (default_tcp_maxseg == -1) { > + default_tcp_maxseg = -2; > + fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); > + if (fd < 0) > + Warning("Failed to create a

Re: [RFC][PATCHES] seamless reload

2017-04-12 Thread Olivier Houchard
On Wed, Apr 12, 2017 at 11:19:37AM -0700, Steven Davidovitz wrote: > I had a problem testing it on Mac OS X, because cmsghdr is aligned to 4 > bytes. I changed the CMSG_ALIGN(sizeof(struct cmsghdr)) call to CMSG_LEN(0) > to fix it. > Oh right, I'll change that. Thanks a lot ! Olivier

Re: [RFC][PATCHES] seamless reload

2017-04-12 Thread Steven Davidovitz
I had a problem testing it on Mac OS X, because cmsghdr is aligned to 4 bytes. I changed the CMSG_ALIGN(sizeof(struct cmsghdr)) call to CMSG_LEN(0) to fix it. On Wed, Apr 12, 2017 at 10:41 AM, Olivier Houchard wrote: > Yet another patch, on top of the previous ones. >

Re: [RFC][PATCHES] seamless reload

2017-04-12 Thread Olivier Houchard
Yet another patch, on top of the previous ones. This one tries to get the default value of TCP_MAXSEG by creating a temporary TCP socket, so that one can remove the "mss" entry from its configuration file, and reset the mss value for any transferred socket from the old process. Olivier >From

Re: [RFC][PATCHES] seamless reload

2017-04-12 Thread Olivier Houchard
On Wed, Apr 12, 2017 at 05:50:54PM +0200, Olivier Houchard wrote: > On Wed, Apr 12, 2017 at 05:30:17PM +0200, Conrad Hoffmann wrote: > > Hi again, > > > > so I tried to get this to work, but didn't manage yet. I also don't quite > > understand how this is supposed to work. The first haproxy

Re: [RFC][PATCHES] seamless reload

2017-04-12 Thread Olivier Houchard
On Wed, Apr 12, 2017 at 05:30:17PM +0200, Conrad Hoffmann wrote: > Hi again, > > so I tried to get this to work, but didn't manage yet. I also don't quite > understand how this is supposed to work. The first haproxy process is > started _without_ the -x option, is that correct? Where does that

Re: [RFC][PATCHES] seamless reload

2017-04-12 Thread Olivier Houchard
On Wed, Apr 12, 2017 at 05:30:17PM +0200, Conrad Hoffmann wrote: > Hi again, > > so I tried to get this to work, but didn't manage yet. I also don't quite > understand how this is supposed to work. The first haproxy process is > started _without_ the -x option, is that correct? Where does that

Re: [RFC][PATCHES] seamless reload

2017-04-12 Thread Conrad Hoffmann
Hi again, so I tried to get this to work, but didn't manage yet. I also don't quite understand how this is supposed to work. The first haproxy process is started _without_ the -x option, is that correct? Where does that instance ever create the socket for transfer to later instances? I have it

Re: [RFC][PATCHES] seamless reload

2017-04-12 Thread Conrad Hoffmann
On 04/12/2017 03:37 PM, Olivier Houchard wrote: > On Wed, Apr 12, 2017 at 03:16:31PM +0200, Conrad Hoffmann wrote: >> Hi Olivier, >> >> I was very eager to try out your patch set, thanks a lot! However, after >> applying all of them (including the last three), it seems that using >> environment

Re: [RFC][PATCHES] seamless reload

2017-04-12 Thread Olivier Houchard
On Wed, Apr 12, 2017 at 03:16:31PM +0200, Conrad Hoffmann wrote: > Hi Olivier, > > I was very eager to try out your patch set, thanks a lot! However, after > applying all of them (including the last three), it seems that using > environment variables in the config is broken (i.e. ${VARNAME} does

Re: [RFC][PATCHES] seamless reload

2017-04-12 Thread Conrad Hoffmann
Hi Olivier, I was very eager to try out your patch set, thanks a lot! However, after applying all of them (including the last three), it seems that using environment variables in the config is broken (i.e. ${VARNAME} does not get replaced with the value of the environment variable anymore). I am

Re: [RFC][PATCHES] seamless reload

2017-04-11 Thread Olivier Houchard
On Tue, Apr 11, 2017 at 08:16:48PM +0200, Willy Tarreau wrote: > Hi guys, > > On Mon, Apr 10, 2017 at 11:08:56PM +0200, Pavlos Parissis wrote: > > IMHO: a better name would be 'stats nounsedsockets', as it is referring to a > > generic functionality of UNIX stats socket, rather to a very specific

Re: [RFC][PATCHES] seamless reload

2017-04-11 Thread Willy Tarreau
Hi guys, On Mon, Apr 10, 2017 at 11:08:56PM +0200, Pavlos Parissis wrote: > IMHO: a better name would be 'stats nounsedsockets', as it is referring to a > generic functionality of UNIX stats socket, rather to a very specific > functionality. Just two things on this : - it's not directly

Re: [RFC][PATCHES] seamless reload

2017-04-11 Thread Olivier Houchard
On Tue, Apr 11, 2017 at 01:23:42PM +0200, Pavlos Parissis wrote: > On 10/04/2017 11:52 μμ, Olivier Houchard wrote: > > On Mon, Apr 10, 2017 at 11:08:56PM +0200, Pavlos Parissis wrote: > >> On 10/04/2017 08:09 , Olivier Houchard wrote: > >>> > >>> Hi, > >>> > >>> On top of those patches, here a

Re: [RFC][PATCHES] seamless reload

2017-04-11 Thread Pavlos Parissis
On 10/04/2017 11:52 μμ, Olivier Houchard wrote: > On Mon, Apr 10, 2017 at 11:08:56PM +0200, Pavlos Parissis wrote: >> On 10/04/2017 08:09 , Olivier Houchard wrote: >>> >>> Hi, >>> >>> On top of those patches, here a 3 more patches. >>> The first one makes the systemd wrapper check for a

Re: [RFC][PATCHES] seamless reload

2017-04-11 Thread Pavlos Parissis
On 10/04/2017 11:48 μμ, Olivier Houchard wrote: > On Mon, Apr 10, 2017 at 10:49:21PM +0200, Pavlos Parissis wrote: >> On 07/04/2017 11:17 , Olivier Houchard wrote: >>> On Fri, Apr 07, 2017 at 09:58:57PM +0200, Pavlos Parissis wrote: On 06/04/2017 04:57 , Olivier Houchard wrote: >

Re: [RFC][PATCHES] seamless reload

2017-04-10 Thread Olivier Houchard
On Mon, Apr 10, 2017 at 11:08:56PM +0200, Pavlos Parissis wrote: > On 10/04/2017 08:09 , Olivier Houchard wrote: > > > > Hi, > > > > On top of those patches, here a 3 more patches. > > The first one makes the systemd wrapper check for a HAPROXY_STATS_SOCKET > > environment variable. If set,

Re: [RFC][PATCHES] seamless reload

2017-04-10 Thread Olivier Houchard
On Mon, Apr 10, 2017 at 10:49:21PM +0200, Pavlos Parissis wrote: > On 07/04/2017 11:17 , Olivier Houchard wrote: > > On Fri, Apr 07, 2017 at 09:58:57PM +0200, Pavlos Parissis wrote: > >> On 06/04/2017 04:57 , Olivier Houchard wrote: > >>> On Thu, Apr 06, 2017 at 04:56:47PM +0200, Pavlos

Re: [RFC][PATCHES] seamless reload

2017-04-10 Thread Pavlos Parissis
On 10/04/2017 08:09 μμ, Olivier Houchard wrote: > > Hi, > > On top of those patches, here a 3 more patches. > The first one makes the systemd wrapper check for a HAPROXY_STATS_SOCKET > environment variable. If set, it will use that as an argument to -x, when > reloading the process. I see you

Re: [RFC][PATCHES] seamless reload

2017-04-10 Thread Pavlos Parissis
On 07/04/2017 11:17 μμ, Olivier Houchard wrote: > On Fri, Apr 07, 2017 at 09:58:57PM +0200, Pavlos Parissis wrote: >> On 06/04/2017 04:57 , Olivier Houchard wrote: >>> On Thu, Apr 06, 2017 at 04:56:47PM +0200, Pavlos Parissis wrote: On 06/04/2017 04:25 , Olivier Houchard wrote: >

Re: [RFC][PATCHES] seamless reload

2017-04-10 Thread Olivier Houchard
Hi, On top of those patches, here a 3 more patches. The first one makes the systemd wrapper check for a HAPROXY_STATS_SOCKET environment variable. If set, it will use that as an argument to -x, when reloading the process. The second one sends listening unix sockets, as well as IPv4/v6 sockets.

Re: [RFC][PATCHES] seamless reload

2017-04-07 Thread Olivier Houchard
On Fri, Apr 07, 2017 at 09:58:57PM +0200, Pavlos Parissis wrote: > On 06/04/2017 04:57 , Olivier Houchard wrote: > > On Thu, Apr 06, 2017 at 04:56:47PM +0200, Pavlos Parissis wrote: > >> On 06/04/2017 04:25 , Olivier Houchard wrote: > >>> Hi, > >>> > >>> The attached patchset is the first

Re: [RFC][PATCHES] seamless reload

2017-04-07 Thread Pavlos Parissis
On 06/04/2017 04:57 μμ, Olivier Houchard wrote: > On Thu, Apr 06, 2017 at 04:56:47PM +0200, Pavlos Parissis wrote: >> On 06/04/2017 04:25 μμ, Olivier Houchard wrote: >>> Hi, >>> >>> The attached patchset is the first cut at an attempt to work around the >>> linux issues with SOREUSEPORT that makes

Re: [RFC][PATCHES] seamless reload

2017-04-06 Thread Olivier Houchard
On Thu, Apr 06, 2017 at 04:56:47PM +0200, Pavlos Parissis wrote: > On 06/04/2017 04:25 μμ, Olivier Houchard wrote: > > Hi, > > > > The attached patchset is the first cut at an attempt to work around the > > linux issues with SOREUSEPORT that makes haproxy refuse a few new > > connections > >

Re: [RFC][PATCHES] seamless reload

2017-04-06 Thread Pavlos Parissis
On 06/04/2017 04:25 μμ, Olivier Houchard wrote: > Hi, > > The attached patchset is the first cut at an attempt to work around the > linux issues with SOREUSEPORT that makes haproxy refuse a few new connections > under heavy load. > This works by transferring the existing sockets to the new