]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: checks: fix slowstart behaviour when server tracking is in use
authorWilly Tarreau <w@1wt.eu>
Mon, 31 Oct 2011 10:53:20 +0000 (11:53 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 31 Oct 2011 10:53:20 +0000 (11:53 +0100)
commit2e99390fafd576ca04265e32f7fb8d6b209252d5
treea6635676fc3c2ba0f3d401811851c831079dff66
parent44267700139fe7fb28f68220d9ee8cc436ffe3e3
BUG/MEDIUM: checks: fix slowstart behaviour when server tracking is in use

Ludovic Levesque reported and diagnosed an annoying bug. When a server is
configured to track another one and has a slowstart interval set, it's
assigned a minimal weight when the tracked server goes back up but keeps
this weight forever.

This is because the throttling during the warmup phase is only computed
in the health checking function.

After several attempts to resolve the issue, the only real solution is to
split the check processing task in two tasks, one for the checks and one
for the warmup. Each server with a slowstart setting has a warmum task
which is responsible for updating the server's weight after a down to up
transition. The task does not run in othe situations.

In the end, the fix is neither complex nor long and should be backported
to 1.4 since the issue was detected there first.
include/types/server.h
src/checks.c
src/haproxy.c