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 <[email protected]> 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 <[email protected]> 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

