1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

always set up a new monitoring event regardless of whether monitoring is

enabled or not

(This used to be ctdb commit c3035f46d1a65d2d97c8be7e679d59e471c092c2)
This commit is contained in:
Ronnie Sahlberg 2007-11-30 10:14:43 +11:00
parent 50573c5391
commit 975fbc8e22

View File

@ -110,15 +110,9 @@ static void ctdb_health_callback(struct ctdb_context *ctdb, int status, void *p)
next_interval = ctdb->tunable.monitor_interval;
}
if (ctdb->monitor_context == NULL) {
DEBUG(0,(__location__ " monitoring was disabled while running"
" healthcheck. Health checks postphoned until"
" monitoring is re-enabled.\n"));
} else {
event_add_timed(ctdb->ev, ctdb->monitor_context,
event_add_timed(ctdb->ev, ctdb->monitor_context,
timeval_current_ofs(next_interval, 0),
ctdb_check_health, ctdb);
}
if (c.old_flags == node->flags) {
return;
@ -149,27 +143,13 @@ static void ctdb_startup_callback(struct ctdb_context *ctdb, int status, void *p
}
if (ctdb->done_startup) {
if (ctdb->monitor_context == NULL) {
DEBUG(0,(__location__ " monitoring was disabled while "
"running startup event. "
"startup event postphoned until "
"monitoring is re-enabled.\n"));
} else {
event_add_timed(ctdb->ev, ctdb->monitor_context,
timeval_zero(),
ctdb_check_health, ctdb);
}
event_add_timed(ctdb->ev, ctdb->monitor_context,
timeval_zero(),
ctdb_check_health, ctdb);
} else {
if (ctdb->monitor_context == NULL) {
DEBUG(0,(__location__ " monitoring was disabled while "
"running startup event. "
"Health cheack postphoned until "
"monitoring is re-enabled.\n"));
} else {
event_add_timed(ctdb->ev, ctdb->monitor_context,
timeval_current_ofs(ctdb->tunable.monitor_interval, 0),
ctdb_check_health, ctdb);
}
event_add_timed(ctdb->ev, ctdb->monitor_context,
timeval_current_ofs(ctdb->tunable.monitor_interval, 0),
ctdb_check_health, ctdb);
}
}