From: Ronnie Sahlberg Date: Wed, 22 Aug 2007 00:38:35 +0000 (+1000) Subject: when a node becomes banned its databases are no longer part of ctdb X-Git-Tag: tevent-0.9.20~348^2~2437^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b47384d57a76530fc2291f218f97ad3332d4b464;p=thirdparty%2Fsamba.git when a node becomes banned its databases are no longer part of ctdb 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) --- diff --git a/ctdb/server/ctdb_monitor.c b/ctdb/server/ctdb_monitor.c index 243961d228f..33c39ec4575 100644 --- a/ctdb/server/ctdb_monitor.c +++ b/ctdb/server/ctdb_monitor.c @@ -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;