diff options
author | Ronnie Sahlberg <ronniesahlberg@gmail.com> | 2009-06-01 14:18:34 +1000 |
---|---|---|
committer | Ronnie Sahlberg <ronniesahlberg@gmail.com> | 2009-06-01 14:18:34 +1000 |
commit | e6170b53894ce188a574c9359e2b8b2797e4e2d1 (patch) | |
tree | 28c61aa02c6d1e5fdbddfdb4774bcd54c3ab5d11 /ctdb/server/ctdb_keepalive.c | |
parent | 42591560506c7fee977975e261e4790ae1a0f97f (diff) | |
download | samba-e6170b53894ce188a574c9359e2b8b2797e4e2d1.tar.gz |
add a new node state : DELETED.
This is used to mark nodes as being DELETED internally in ctdb
so that nodes are not renumbered if / when they are removed from the nodes file.
This is used to be able to do "ctdb reloadnodes" at runtime without
causing nodes to be renumbered.
To do this, instead of deleting a node from the nodes file, just comment it out like
1.0.0.1
#1.0.0.2
1.0.0.3
After removing 1.0.0.2 from the cluster, the remaining nodes retain their
pnn's from prior to the deletion, namely 0 and 2
Any line in the nodes file that is commented out represents a DELETED pnn
(This used to be ctdb commit 6a5e4fd7fa391206b463bb4e976502f3ac5bd343)
Diffstat (limited to 'ctdb/server/ctdb_keepalive.c')
-rw-r--r-- | ctdb/server/ctdb_keepalive.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ctdb/server/ctdb_keepalive.c b/ctdb/server/ctdb_keepalive.c index 524feb16966..dfe7cfc6221 100644 --- a/ctdb/server/ctdb_keepalive.c +++ b/ctdb/server/ctdb_keepalive.c @@ -37,6 +37,11 @@ static void ctdb_check_for_dead_nodes(struct event_context *ev, struct timed_eve /* send a keepalive to all other nodes, unless */ for (i=0;i<ctdb->num_nodes;i++) { struct ctdb_node *node = ctdb->nodes[i]; + + if (node->flags & NODE_FLAGS_DELETED) { + continue; + } + if (node->pnn == ctdb->pnn) { continue; } |