From: Willy Tarreau Date: Sat, 28 Dec 2013 20:21:31 +0000 (+0100) Subject: BUG/MEDIUM: checks: unchecked servers could not be enabled anymore X-Git-Tag: v1.5-dev22~86 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e24d96393a2e93e1a4819098b19228fa1d3683d8;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: checks: unchecked servers could not be enabled anymore Recent fix 02541e8 (BUG/MEDIUM: checks: servers must not start in slowstart mode) failed to consider one case : a server chich is not checked at all can be disabled and has to support being enabled again. So we must also enter the set_server_up() function when the checks are totally disabled. No backport is needed. --- diff --git a/src/checks.c b/src/checks.c index bdb8f07ad7..c055017532 100644 --- a/src/checks.c +++ b/src/checks.c @@ -483,7 +483,8 @@ void set_server_up(struct check *check) { ((s->check.state & CHK_ST_ENABLED) && (s->check.health == s->check.rise) && (s->agent.health >= s->agent.rise || !(s->agent.state & CHK_ST_ENABLED))) || ((s->agent.state & CHK_ST_ENABLED) && (s->agent.health == s->agent.rise) && - (s->check.health >= s->check.rise || !(s->check.state & CHK_ST_ENABLED)))) { + (s->check.health >= s->check.rise || !(s->check.state & CHK_ST_ENABLED))) || + (!(s->agent.state & CHK_ST_ENABLED) && !(s->check.state & CHK_ST_ENABLED))) { if (s->proxy->srv_bck == 0 && s->proxy->srv_act == 0) { if (s->proxy->last_change < now.tv_sec) // ignore negative times s->proxy->down_time += now.tv_sec - s->proxy->last_change;