/* if the local daemon is STOPPED or BANNED, we verify that the databases are
also frozen and thet the recmode is set to active.
*/
- if (nodemap->nodes[pnn].flags & (NODE_FLAGS_STOPPED | NODE_FLAGS_BANNED)) {
+ if (rec->node_flags & (NODE_FLAGS_STOPPED | NODE_FLAGS_BANNED)) {
ret = ctdb_ctrl_getrecmode(ctdb, mem_ctx, CONTROL_TIMEOUT(), CTDB_CURRENT_NODE, &ctdb->recovery_mode);
if (ret != 0) {
DEBUG(DEBUG_ERR,(__location__ " Failed to read recmode from local node\n"));
return;
}
- return;
}
+
+ /* If this node is stopped or banned then it is not the recovery
+ * master, so don't do anything. This prevents stopped or banned
+ * node from starting election and sending unnecessary controls.
+ */
+ return;
}
+
/* If the local node is stopped, verify we are not the recmaster
and yield this role if so
*/
return;
}
- /* If this node is stopped then it is not the recovery master
- * so the only remaining action is to potentially to verify
- * the local IP allocation below. This won't accomplish
- * anything useful so skip it.
- */
- if (rec->node_flags & NODE_FLAGS_STOPPED) {
- return;
- }
-
/* verify that we have all ip addresses we should have and we dont
* have addresses we shouldnt have.
*/