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 bdb8f07..c055017 100644
--- a/src/checks.c
+++ b/src/checks.c
@@ -483,7 +483,8 @@
((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;