]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
when a node becomes banned its databases are no longer part of ctdb
authorRonnie Sahlberg <sahlberg@ronnie>
Wed, 22 Aug 2007 00:38:35 +0000 (10:38 +1000)
committerRonnie Sahlberg <sahlberg@ronnie>
Wed, 22 Aug 2007 00:38:35 +0000 (10:38 +1000)
and it should thus no longer serve any database access calls until it
has been reintroduced into the cluster.

when becoming banned,   reset the local generation id to 1   to prevent
any further database access calls from other nodes from being processed.

(This used to be ctdb commit b531021db43ebaa5f5d0ace28c59913d359bd8a8)

ctdb/server/ctdb_monitor.c

index 243961d228f98c1319bd978be978d81b7c5ed499..33c39ec457511c26ee76853eddd4df48950da218 100644 (file)
@@ -221,6 +221,13 @@ int32_t ctdb_control_modflags(struct ctdb_context *ctdb, TDB_DATA indata)
        if ((node->flags & NODE_FLAGS_BANNED) && !(old_flags & NODE_FLAGS_BANNED)) {
                /* make sure we are frozen */
                DEBUG(0,("This node has been banned - forcing freeze and recovery\n"));
+               /* Reset the generation id to 1 to make us ignore any
+                  REQ/REPLY CALL/DMASTER someone sends to us.
+                  We are now banned so we shouldnt service database calls
+                  anymore.
+               */
+               ctdb->vnn_map->generation = 1;
+
                ctdb_start_freeze(ctdb);
                ctdb_release_all_ips(ctdb);
                ctdb->recovery_mode = CTDB_RECOVERY_ACTIVE;