Hi Pavlos, On Wed, Sep 04, 2024 at 10:27:29AM +0200, Pavlos Parissis wrote: > On Tue, 3 Sept 2024 at 22:26, Aaron Kuehler <[email protected]> > wrote: > > > > Allow the user to set the "initial state" of a server. > > > > Context: > > > > Servers are always set in an UP status by default. In > > some cases, further checks are required to determine if the server is > > ready to receive client traffic. > > > > This introduces the "init-state {up|down}" configuration parameter to > > the server. > > > > - when not set, the server is considered available as soon as a connection > > can be established. > > - when set to 'up', the server is considered available as soon as a > > connection can be established. > > - when set to 'down', the server is initially considered unavailable until > > it successfully completes its health checks. > > > > The server's init-state is considered when the HAProxy instance > > is (re)started, a new server is detected (for example via service > > discovery / DNS resolution), a server exits maintenance, etc. > > Will this honour the functionality coming from load-server-state-from-file? > I assume if users utilize the aforementioned setting this new functionality, > which is great and thanks a lot for delivering it, will not kick in.
Logiclaly it should not change anything there since the state file already contains the last state (srv_op_state), so the server whose state is loaded from the file will be restored to its previous state. What is changed here is the ability to set the server up/down when leaving maintenance. E.g. you had put a server in maintenance state, you reinstalled it, then you enable it from the CLI. Before it would instantly take traffic and perform a check to possibly turn it off again, now you'll have the option to let it run its checks before being used. Hoping this helps, Willy

