summaryrefslogtreecommitdiff
path: root/server/failover.c
diff options
context:
space:
mode:
authorShawn Routhier <sar@isc.org>2013-11-08 12:29:20 -0800
committerShawn Routhier <sar@isc.org>2013-11-08 12:29:20 -0800
commitf88446f16b9b3be36492f78b0f66a4166e459896 (patch)
treefeed6e4e28d73aae7447220be33d3f772bc5ca07 /server/failover.c
parentcde11a4cdb79f5447f4459d156d759620949539f (diff)
downloadisc-dhcp-f88446f16b9b3be36492f78b0f66a4166e459896.tar.gz
[master] Emit log messages when the server is stable
Emit a log message when the server had completed initialization and is about to start dispatching. And emit log messages when both peers in a failover pair have reached the normal state.
Diffstat (limited to 'server/failover.c')
-rw-r--r--server/failover.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/server/failover.c b/server/failover.c
index 7a9ae9e2..3dfe7b99 100644
--- a/server/failover.c
+++ b/server/failover.c
@@ -1793,6 +1793,10 @@ isc_result_t dhcp_failover_set_state (dhcp_failover_state_t *state,
log_info ("failover peer %s: I move from %s to %s",
state -> name, dhcp_failover_state_name_print (saved_state),
dhcp_failover_state_name_print (state -> me.state));
+
+ /* If both servers are now normal log it */
+ if ((state->me.state == normal) && (state->partner.state == normal))
+ log_info("failover peer %s: Both servers normal", state->name);
/* If we were in startup and we just left it, cancel the timeout. */
if (new_state != startup && saved_state == startup)
@@ -1986,6 +1990,10 @@ isc_result_t dhcp_failover_peer_state_changed (dhcp_failover_state_t *state,
state -> name,
dhcp_failover_state_name_print (previous_state),
dhcp_failover_state_name_print (state -> partner.state));
+
+ /* If both servers are now normal log it */
+ if ((state->me.state == normal) && (state->partner.state == normal))
+ log_info("failover peer %s: Both servers normal", state->name);
if (!write_failover_state (state) || !commit_leases ()) {
/* This is bad, but it's not fatal. Of course, if we