On Thu, Nov 03, 2016 at 05:45:34PM +0100, Willy Tarreau wrote: > Hi Thomas, > > On Sun, Oct 30, 2016 at 09:14:53PM +0200, Thomas Raehalme wrote: > > Hi, > > > > In January[1] and June[2] there were discussions regarding the DRAIN state > > not being preserved when loading server state from file. Looking at the > > source it looks to me as the issue has not been resolved. > > > > Have you come to a conclusion if the current behaviour is how it will be or > > if a fix can be expected at some time? > > By looking at the code, I think there is a bug. I'm not yet certain because > there are various combinations but I think one of them is not correct. In > fact the goal is to ensure that : > - when the config doesn't change, the state file always has precedence ; > - when the config changes, it takes precedence, otherwise it's impossible > to take config changes into account, and the first purpose of the server > state file is to keep state across reloads caused by config updates! > > I need to continue to study this part to understand if the difference between > the code and the comment is intentional or a result of another corner case we > initially missed.
OK now after writing down the various cases and reviewing the design notes we exchanged last year with Baptiste on this subject, it's clear that the comment is right and the code wrong (it does the exact opposite of the code). This patch fixes it for me. Could you please confirm as well ? If so I'll backport it into 1.6 so that 1.6.10 gets it (ie I'm interested in knowing more or less quickly :-)). Thanks! Willy

