From: Amitay Isaacs Date: Wed, 16 Sep 2015 08:20:31 +0000 (+1000) Subject: ctdb-banning: Do not freeze databases on ban in the daemon X-Git-Tag: talloc-2.1.4~87 X-Git-Url: http://git.samba.org/samba.git/?a=commitdiff_plain;h=b4357a79d916b1f8ade8fa78563fbef0ce670aa9;p=ambi%2Fsamba-autobuild%2F.git ctdb-banning: Do not freeze databases on ban in the daemon Once the node is marked as banned, the recovery daemon on that node will start freezing the databases anyway. This check happens every second in recovery daemon, so the delay in freezing the databases on ban would be a second. The main reason for freezing databases is to prevent any database access from samba clients. However, banning code also drops the public IPs and thus disconnecting the clients. In addition, the generation gets set to INVALID_GENERATION, thus database record migration requests on that node will not be processed. Signed-off-by: Amitay Isaacs Reviewed-by: Martin Schwenke --- diff --git a/ctdb/server/ctdb_banning.c b/ctdb/server/ctdb_banning.c index 91064b4c516..92026fd83ff 100644 --- a/ctdb/server/ctdb_banning.c +++ b/ctdb/server/ctdb_banning.c @@ -50,10 +50,7 @@ ctdb_ban_node_event(struct event_context *ev, struct timed_event *te, void ctdb_local_node_got_banned(struct ctdb_context *ctdb) { - uint32_t i; - - /* make sure we are frozen */ - DEBUG(DEBUG_NOTICE,("This node has been banned - forcing freeze and recovery\n")); + DEBUG(DEBUG_NOTICE,("This node has been banned - forcing recovery\n")); /* Reset the generation id to 1 to make us ignore any REQ/REPLY CALL/DMASTER someone sends to us. @@ -62,10 +59,9 @@ void ctdb_local_node_got_banned(struct ctdb_context *ctdb) */ ctdb->vnn_map->generation = INVALID_GENERATION; + /* make sure we get frozen */ ctdb->recovery_mode = CTDB_RECOVERY_ACTIVE; - for (i=1; i<=NUM_DB_PRIORITIES; i++) { - ctdb_start_freeze(ctdb, i); - } + ctdb_release_all_ips(ctdb); }