-
Notifications
You must be signed in to change notification settings - Fork 762
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
server-state-file on reload; discard server changes #2506
Comments
Hi, these actually are not bugs but design limitations that were overlooked by then. The state file doesn't include the config settings, only the last ones, so when they differ, some arbitration has to be performed to figure which one is the most likely valid :-/ I think there's an issue somewhere mentioning the need to extend the file format to place config stuff there so that upon reload there's no doubt about what has changed. The algorithm is simple: if the previous config differs from the new one, the new config must be used because it was part of the cause for the reload. Otherwise the last state must be used. |
Your Feature Request
There are multiple bugs about
server-state-file
where when used, a reload would not pick up changes to ports (e.g. #2103) or when enabling TLS/SSL for backends (e.g. #2401).Maybe HAProxy could detect these changes on reload and not load the state for these servers? Load everything else where the server and port matches as well as TLS/SSL enabled.
Maybe a HAProxy option, or side tool, to generate the
server-state-file
from the latesthaproxy.cfg
on disk and then overlay it with the existing server state info removing/discarding servers that doesn't exist -echo 'show servers updated-state' | socat stdio /path/to/socket > /your/state/file
or similar.What are you trying to do?
We're using
server-state-file
to reduce the downtime on HAProxy reload. Unfortunately, sometimes port changes are made or TLS/SSL enabled for backends and that's not picked up without completely removing the state file then forcing a reload.Unfortunately, on servers where there are a lot of sites, this causes downtime to the rest even though it's changes for a single site.
Output of
haproxy -vv
Doesn't appear to be much progress with #953
The text was updated successfully, but these errors were encountered: