Willy / Simon,

I think I've got a bit confused myself -

I've just installed the patches and tested and it fixes the issues we
seeing with HAProxy getting stuck in DRAIN mode when the agent
temporarily responds with 0% idle.
i.e. when the load on the server decreases HAProxy should
automatically start passing traffic again.

It would however probably make sense to keep the current behaviour of
having a 0 weight highlighted in blue. (but not having the DRAIN state
activated)
I think it is potentially important to know that the DRAIN state or
AGENT DRAIN STATE is different to just weight=0 and UP.

I'm happy with any colours basically as long as just setting 0 weight
from the agent  doesn't force agent drain.

Does that make any sense?
And sorry if I have caused even more confusion!




On 9 April 2015 at 12:42, Willy Tarreau <w...@1wt.eu> wrote:
> Hi Simon!
>
> On Thu, Apr 09, 2015 at 03:47:13PM +0900, Simon Horman wrote:
>> There are some similarities between a weight of zero and the
>> administratively set drain state: both allow existing connections
>> to continue while not accepting any new ones.
>>
>> However, when reporting a server state generally a distinction is made
>> between state=UP,weight=0 and state=DRAIN,weight=*. This patch makes
>> stats reporting consistent in this regard.
>
> Just to be sure, doesn't it undo what the two following patches tried to
> do :
>
>   commit cc8bb92f32128a603d4206f066e99944e4049681
>   Author: Geoff Bucar <viralb...@gmail.com>
>   Date:   Thu Apr 18 13:53:16 2013 -0700
>
>     MINOR: stats: show soft-stopped servers in different color
>
>     A "soft-stopped" server (weight 0) can be missed easily in the
>     webinterface. Fix this by using a specific class (and color).
>
> and :
>
>   commit 6b7764a983a7dd97af6a5398da40c63353698328
>   Author: Willy Tarreau <w...@1wt.eu>
>   Date:   Wed Dec 4 00:43:21 2013 +0100
>
>     MINOR: stats: remove some confusion between the DRAIN state and NOLB
>
>     We now have to report 2 conflicting information on the stats page :
>       - NOLB  = server which returns 404 and stops load balancing ;
>       - DRAIN = server with a weight forced to zero
>
>     The DRAIN state was previously detected from eweight==0 and represented in
>     blue so that a temporarily disabled server was noticed. This was done by
>     commit cc8bb92 (MINOR: stats: show soft-stopped servers in different 
> color).
>     This choice suffered from a small defect however, which is that a server
>     with a zero weight was reported in this color whatever its state (even 
> down
>     or switching).
>
>     Also, one of the motivations for the color above was because the NOLB 
> state
>     is barely detectable as it's very close to the UP state.
>
>     Since commit 8c3d0be (MEDIUM: Add DRAIN state and report it on the stats 
> page),
>     we have the new DRAIN state to show servers with a zero weight. The 
> colors are
>     unfortunately very close to those of the MAINT state, and some users were
>     confused by the disappearance of the blue bars.
>
> ?
>
> It seems important for many users that weight=0 is clearly visible on
> the stats page, which I tend to agree with. I agree that reporting the
> word "DRAIN" is not suited, but functionally it's exactly the same : the
> server doesn't take new traffic anymore. So for people heavily relying on
> the stats page to monitor their server states during deployments, it seems
> important to me that the color remains at least similar. I suspect that
> the method we used to have with both the color and the same being reported
> based on srvstate is a bit outdated now, and maybe we should try to address
> this first (eg: by using a function to get the color to report and another
> one to report the description).
>
> If your patch maintains the blue line for weight==0, then please ignore my
> comment above.
>
> Best regards,
> Willy
>



-- 
Regards,

Malcolm Turnbull.

Loadbalancer.org Ltd.
Phone: +44 (0)330 1604540
http://www.loadbalancer.org/

Reply via email to