Hello Cyril,
This also can be achieved by using 'disabled' keyword on server, and update CLI to enable it. Are you sure that using server-state file to keep server DOWN from previous health check is the expected behaviour ? May be i'm wrong, but when i have a server in DOWN state because of health check, if a disable health check on it, i expected the server to be UP. ________________________________ De : Cyril Bonté <[email protected]> Envoyé : mardi 29 août 2017 00:12 À : Julien Laffaye; Tim Düsterhus Cc : [email protected] Objet : Re: Removed health check in combination with load-server-state-from-file (Bug) Hi Julien and Tim, Le 28/08/2017 à 10:32, Julien Laffaye a écrit : > Hello, > > I am experiencing the same problem. > Is this the expected behaviour ? Or is it a bug ? Yes, it's expected. One use case is to start all servers in a DOWN state then programmatically set one or several of them UP once everything is initialized in the architecture, using the CLI command "set server <backend>/<server> health up". > > Regards, > Julien > > On Sat, Aug 26, 2017 at 2:55 AM, Tim Düsterhus <[email protected] > <mailto:[email protected]>> wrote: > > Hi > > as I did not receive any reply at all to my email from Aug 13 I thought > I resend it (Quoted below). Can anyone at least verify that my bug > report is valid? :-) > > Tim > > Am 13.08.2017 um 13:19 schrieb Tim Düsterhus: > > Hi > > > > I run haproxy with 'load-server-state-from-file'. Before reloading > > haproxy I dump the state using: > > > > echo show servers state |nc -U admin.sock > /etc/haproxy/state/global > > > > I noticed a buggy behaviour with this: > > > > 1. Check that the backend is 'DOWN'. > > 2. Dump the state using the command above (the 'DOWN' state is > written > > into the file). > > 3. Remove the health check of the backend. > > 4. Reload haproxy. > > 5. The backend will now be 'DOWN' forever, as the initial state taken > > from the file is 'DOWN' and no health checks are running. > > > > I attached an example configuration and an example state file. To > > reproduce the issue: > > > > 1. Start haproxy. > > 2. Open the Stats page. > > 3. Place the state file. > > 4. Remove the 'check' from the configuration. > > 5. Reload haproxy. > > 6. Start the backend. > > 7. Reload the Stats page and notice that the backend still is 'DOWN'. > > > > Tim > > > > -- Cyril Bonté

