Not just stopped nodes. In reality, this means that banned nodes will
also yield, since nodes in the other inactive states won't be running
a daemon.
This seems sensible since if another node notices that an inactive
node is the recovery master then it will force an election anyway.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(cherry picked from commit
fc18188b7b63eb0dafbc47e3abf80e306e1dfc31)
/* If the local node is stopped, verify we are not the recmaster
and yield this role if so
*/
- if ((nodemap->nodes[pnn].flags & NODE_FLAGS_STOPPED) && (rec->recmaster == pnn)) {
- DEBUG(DEBUG_ERR,("Local node is STOPPED. Yielding recmaster role\n"));
+ if ((nodemap->nodes[pnn].flags & NODE_FLAGS_INACTIVE) && (rec->recmaster == pnn)) {
+ DEBUG(DEBUG_ERR,("Local node is INACTIVE. Yielding recmaster role\n"));
force_election(rec, pnn, nodemap);
return;
}