During startup there are some initial setup and commands done synchronous which means it is semi-normal to have the eventsystem blocked for some situations.
Once startup has finished, all handling should be asynchronous so activate the monitoring of the eventsystems at that stage.
CQ S1021936
{
struct ctdb_context *ctdb = talloc_get_type(private_data, struct ctdb_context);
- if (getpid() != ctdbd_pid) {
+ if (getpid() != ctdb->ctdbd_pid) {
return;
}
}
block_signal(SIGPIPE);
- ctdbd_pid = getpid();
- ctdb->ctdbd_pid = ctdbd_pid;
+ ctdb->ctdbd_pid = getpid();
- DEBUG(DEBUG_ERR, ("Starting CTDBD as pid : %u\n", ctdbd_pid));
+ DEBUG(DEBUG_ERR, ("Starting CTDBD as pid : %u\n", ctdb->ctdbd_pid));
if (ctdb->do_setsched) {
/* try to set us up as realtime */
} else if (status == 0) {
DEBUG(DEBUG_NOTICE,("startup event OK - enabling monitoring\n"));
ctdb->done_startup = true;
+ ctdbd_pid = ctdb->ctdbd_pid;
ctdb->monitor->next_interval = 2;
ctdb_run_notification_script(ctdb, "startup");
}