BUG/MEDIUM: server: support changing the slowstart value from state-file
authorWilly Tarreau <w@1wt.eu>
Thu, 22 Oct 2020 09:30:59 +0000 (11:30 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 22 Oct 2020 10:07:07 +0000 (12:07 +0200)
commit1e690bb6c49590cd3b4fae11c2f85f37e958635e
tree7db896f09845f0d5b8b8e7b9c17949c9240217b8
parent5c643f37d0ba3390b35332453ab97b4d1a24e2ab
BUG/MEDIUM: server: support changing the slowstart value from state-file

If the slowstart value in a state file implies the latest state change
is within the slowstart period, we end up calling srv_update_status()
to reschedule the server's state change but its task is not yet
allocated and remains null, causing a crash on startup.

Make sure srv_update_status() supports being called with partially
initialized servers which do not yet have a task. If the task has to
be scheduled, it will necessarily happen after initialization since
it will result from a state change.

This should be backported wherever server-state is present.
src/server.c