Re: Set State to DRAIN vs set weight 0

2016-01-24 Thread Willy Tarreau
On Mon, Jan 25, 2016 at 12:50:48AM +0100, Baptiste wrote: > That said, I may have found something in accurate. We'll discuss about > it tomorrow in the office. OK. > > BTW, maybe we should provide this cmd line option, then it will be possible > > to state that a service reload maintain the state

Re: Set State to DRAIN vs set weight 0

2016-01-24 Thread Baptiste
On Mon, Jan 25, 2016 at 12:35 AM, Willy Tarreau wrote: > Hi Baptiste, > > On Sun, Jan 24, 2016 at 09:01:27PM +0100, Baptiste wrote: >> I commented this case in the code: >> >> /* apply drain mode if server is currently enabled */ >> if (!(srv->admin & SRV_ADMF_FMAINT) && (srv_admin_state & SRV_ADM

Re: Set State to DRAIN vs set weight 0

2016-01-24 Thread Baptiste
On Sun, Jan 24, 2016 at 9:01 PM, Baptiste wrote: > On Fri, Jan 22, 2016 at 10:46 AM, Willy Tarreau wrote: >> Hi Alex, >> >> On Fri, Jan 22, 2016 at 11:32:14AM +0200, Alex wrote: >>> Hi, >>> >>> Thank you for the answer, this is very helpful. >>> So to sum up my understanding, usually drain is use

Re: Set State to DRAIN vs set weight 0

2016-01-24 Thread Willy Tarreau
Hi Baptiste, On Sun, Jan 24, 2016 at 09:01:27PM +0100, Baptiste wrote: > I commented this case in the code: > > /* apply drain mode if server is currently enabled */ > if (!(srv->admin & SRV_ADMF_FMAINT) && (srv_admin_state & SRV_ADMF_FDRAIN)) { > /* The SRV_ADMF_FDRAIN flag is inherited

Re: Set State to DRAIN vs set weight 0

2016-01-24 Thread Baptiste
On Fri, Jan 22, 2016 at 10:46 AM, Willy Tarreau wrote: > Hi Alex, > > On Fri, Jan 22, 2016 at 11:32:14AM +0200, Alex wrote: >> Hi, >> >> Thank you for the answer, this is very helpful. >> So to sum up my understanding, usually drain is used in operations by >> setting the server in this state for

Re: Set State to DRAIN vs set weight 0

2016-01-22 Thread Willy Tarreau
Hi Alex, On Fri, Jan 22, 2016 at 11:32:14AM +0200, Alex wrote: > Hi, > > Thank you for the answer, this is very helpful. > So to sum up my understanding, usually drain is used in operations by > setting the server in this state for a specific amount of time and then put > in maintenance state. So

Re: Set State to DRAIN vs set weight 0

2016-01-22 Thread Alex
Hi, Thank you for the answer, this is very helpful. So to sum up my understanding, usually drain is used in operations by setting the server in this state for a specific amount of time and then put in maintenance state. So: 1. If I have an automated operation process which sets a server state to

Re: Set State to DRAIN vs set weight 0

2016-01-20 Thread Alex
Hello, I've found another difference - regarding "seamless server states", according to my testing using version 1.6.3 administrative state DRAIN is not preserved after a reload but set weight 0 is preserved. For my use case, using DRAIN seems the logical choice but because of the 2 issues that I

Re: Set State to DRAIN vs set weight 0

2016-01-19 Thread Igor Cicimov
Hi Baptiste, On Wed, Jan 20, 2016 at 11:08 AM, Baptiste wrote: > On Sat, Jan 16, 2016 at 3:37 AM, Igor Cicimov > wrote: > > > > > > On Sat, Jan 16, 2016 at 7:36 AM, Alex wrote: > >> > >> Hello, > >> > >> I was testing haproxy version 1.6.3 and I am a bit confused regarding > >> draining a serv

Re: Set State to DRAIN vs set weight 0

2016-01-19 Thread Baptiste
On Sat, Jan 16, 2016 at 3:37 AM, Igor Cicimov wrote: > > > On Sat, Jan 16, 2016 at 7:36 AM, Alex wrote: >> >> Hello, >> >> I was testing haproxy version 1.6.3 and I am a bit confused regarding >> draining a server. >> >> According to the documentation: >> set server / state [ ready | drain | main

Re: Set State to DRAIN vs set weight 0

2016-01-15 Thread Igor Cicimov
On Sat, Jan 16, 2016 at 7:36 AM, Alex wrote: > Hello, > > I was testing haproxy version 1.6.3 and I am a bit confused regarding > draining a server. > > According to the documentation: > set server / state [ ready | drain | maint ] > [...] Setting the mode to "drain" only removes the server from

Set State to DRAIN vs set weight 0

2016-01-15 Thread Alex
Hello, I was testing haproxy version 1.6.3 and I am a bit confused regarding draining a server. According to the documentation: set server / state [ ready | drain | maint ] [...] Setting the mode to "drain" only removes the server from load balancing but still allows it to be checked and to accep