MINOR: checks: replace state DISABLED with CONFIGURED and ENABLED
At the moment, health checks and agent checks are tied : no agent
check is emitted if no health check is enabled. Other parameters
are considered in the condition for letting checks run. It will
help us selectively enable checks (agent and regular checks) to be
know whether they're enabled/disabled and configured or not. Now
we can already emit an error when trying to enable an unconfigured
agent.
diff --git a/src/cfgparse.c b/src/cfgparse.c
index aa8bb90..b675941 100644
--- a/src/cfgparse.c
+++ b/src/cfgparse.c
@@ -5123,6 +5123,7 @@
goto out;
}
+ newsrv->check.state |= CHK_ST_CONFIGURED | CHK_ST_ENABLED;
newsrv->state |= SRV_CHECKED;
}
@@ -5145,6 +5146,7 @@
goto out;
}
+ newsrv->agent.state |= CHK_ST_CONFIGURED | CHK_ST_ENABLED;
newsrv->state |= SRV_AGENT_CHECKED;
}