If a server is switched to maintenance mode while a check is in progress,
the successful completion of the check must not switch it back up. This
is still a consequence of using the same function set_server_up() for
every state change. Bug reported by Igor at owind.
This fix should be backported to 1.4 which is affected as well.
set_server_disabled(check);
}
- if (check->health < check->rise + check->fall - 1) {
+ if (!(s->state & SRV_MAINTAIN) &&
+ check->health < check->rise + check->fall - 1) {
check->health++; /* was bad, stays for a while */
set_server_up(check);
}