From b2a81fb6b11984a9857ad3a617dd74dbe96f817f Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Fri, 23 Nov 2007 11:31:42 +1100 Subject: [PATCH] when we as the recovery daemon on the recovery master detects that the flags differ between the local ctdb daemon and the remote node we can force a flags update on all nodes and not just the local daemon (This used to be ctdb commit a924eb89c966ecbae029ca137e06cffd40cc70fd) --- ctdb/server/ctdb_recoverd.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ctdb/server/ctdb_recoverd.c b/ctdb/server/ctdb_recoverd.c index 4601ae69eb8..0eefbfd4fc4 100644 --- a/ctdb/server/ctdb_recoverd.c +++ b/ctdb/server/ctdb_recoverd.c @@ -742,7 +742,8 @@ static void ctdb_wait_election(struct ctdb_recoverd *rec) /* - update our local flags from all remote connected nodes. + Update our local flags from all remote connected nodes. + This is only run when we are or we belive we are the recovery master */ static int update_local_flags(struct ctdb_context *ctdb, struct ctdb_node_map *nodemap) { @@ -782,6 +783,8 @@ static int update_local_flags(struct ctdb_context *ctdb, struct ctdb_node_map *n /* We also should tell our daemon about this so it updates its flags or else we will log the same message again in the next iteration of recovery. + Since we are the recovery master we can just as + well update the flags on all nodes. */ c.pnn = nodemap->nodes[j].pnn; c.old_flags = nodemap->nodes[j].flags; @@ -790,7 +793,7 @@ static int update_local_flags(struct ctdb_context *ctdb, struct ctdb_node_map *n data.dptr = (uint8_t *)&c; data.dsize = sizeof(c); - ctdb_send_message(ctdb, CTDB_CURRENT_NODE, + ctdb_send_message(ctdb, CTDB_BROADCAST_CONNECTED, CTDB_SRVID_NODE_FLAGS_CHANGED, data);