[SCM] Samba Shared Repository - branch master updated

Michael Adam obnox at samba.org
Wed Jun 1 15:37:03 UTC 2016


The branch, master has been updated
       via  f8141e9 ctdb-recoverd: Freeze databases whenever the node is INACTIVE
       via  4b5eaf9 ctdb:banning: Improve debug message in ctdb_ban_node_event()
       via  57cb011 ctdb:banning: Improve a debug message
      from  01043fc repl_meta_data: Do rename before deleted object cleanup

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit f8141e91a693912ea1107a49320e83702a80757a
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Wed Jun 1 12:10:46 2016 +1000

    ctdb-recoverd: Freeze databases whenever the node is INACTIVE
    
    If the node becomes stopped or banned after recovery is marked
    active, then it will never freeze the databases, and hence the
    node will keep banning itself indefinitely, until ctdbd is restarted.
    
    This is a regression from 4.3, introduced with
    
    b4357a79d916b1f8ade8fa78563fbef0ce670aa9
    
    and
    
    d8f3b490bbb691c9916eed0df5b980c1aef23c85
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11945
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Martin Schwenke <martin at meltin.net>
    
    Autobuild-User(master): Michael Adam <obnox at samba.org>
    Autobuild-Date(master): Wed Jun  1 17:36:12 CEST 2016 on sn-devel-144

commit 4b5eaf9a4ee21743f2a0e926fc8720a7ef0d8879
Author: Michael Adam <obnox at samba.org>
Date:   Wed Jun 1 01:16:23 2016 +0200

    ctdb:banning: Improve debug message in ctdb_ban_node_event()
    
    Make it more clear what happens when reading the logs.
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 57cb011a0a1815aa29f65116d75c78080bb135dc
Author: Michael Adam <obnox at samba.org>
Date:   Wed Jun 1 00:53:54 2016 +0200

    ctdb:banning: Improve a debug message
    
    This adapts the debug message in local_node_got_banned
    to reflect what the function is currently doing.
    This message was not adapted when the function was changed.
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

-----------------------------------------------------------------------

Summary of changes:
 ctdb/server/ctdb_banning.c  |  6 ++++--
 ctdb/server/ctdb_recoverd.c | 15 +++++++++++++--
 2 files changed, 17 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/ctdb/server/ctdb_banning.c b/ctdb/server/ctdb_banning.c
index a4c56f5..9cd1636 100644
--- a/ctdb/server/ctdb_banning.c
+++ b/ctdb/server/ctdb_banning.c
@@ -42,7 +42,8 @@ static void ctdb_ban_node_event(struct tevent_context *ev,
 
 	/* Make sure we were able to freeze databases during banning */
 	if (!ctdb_db_all_frozen(ctdb)) {
-		DEBUG(DEBUG_ERR, ("Banning timed out, but still unable to freeze databases\n"));
+		DEBUG(DEBUG_ERR, ("Banning timed out, but not all databases "
+				  "frozen yet - banning this node again.\n"));
 		ctdb_ban_self(ctdb);
 		return;
 	}
@@ -60,7 +61,8 @@ void ctdb_local_node_got_banned(struct ctdb_context *ctdb)
 {
 	struct ctdb_db_context *ctdb_db;
 
-	DEBUG(DEBUG_NOTICE,("This node has been banned - forcing recovery\n"));
+	DEBUG(DEBUG_NOTICE, ("This node has been banned - releasing all public "
+			     "IPs and setting the generation to INVALID.\n"));
 
 	/* Reset the generation id to 1 to make us ignore any
 	   REQ/REPLY CALL/DMASTER someone sends to us.
diff --git a/ctdb/server/ctdb_recoverd.c b/ctdb/server/ctdb_recoverd.c
index 09940dc..cb5f8a3 100644
--- a/ctdb/server/ctdb_recoverd.c
+++ b/ctdb/server/ctdb_recoverd.c
@@ -257,6 +257,7 @@ struct ctdb_recoverd {
 	struct ctdb_iface_list_old *ifaces;
 	uint32_t *force_rebalance_nodes;
 	struct ctdb_node_capabilities *caps;
+	bool frozen_on_inactive;
 };
 
 #define CONTROL_TIMEOUT() timeval_current_ofs(ctdb->tunable.recover_timeout, 0)
@@ -3550,11 +3551,18 @@ static void main_loop(struct ctdb_context *ctdb, struct ctdb_recoverd *rec,
 
 				return;
 			}
-			ret = ctdb_ctrl_freeze(ctdb, CONTROL_TIMEOUT(), CTDB_CURRENT_NODE);
+		}
+		if (! rec->frozen_on_inactive) {
+			ret = ctdb_ctrl_freeze(ctdb, CONTROL_TIMEOUT(),
+					       CTDB_CURRENT_NODE);
 			if (ret != 0) {
-				DEBUG(DEBUG_ERR,(__location__ " Failed to freeze node in STOPPED or BANNED state\n"));
+				DEBUG(DEBUG_ERR,
+				      (__location__ " Failed to freeze node "
+				       "in STOPPED or BANNED state\n"));
 				return;
 			}
+
+			rec->frozen_on_inactive = true;
 		}
 
 		/* If this node is stopped or banned then it is not the recovery
@@ -3564,6 +3572,8 @@ static void main_loop(struct ctdb_context *ctdb, struct ctdb_recoverd *rec,
 		return;
 	}
 
+	rec->frozen_on_inactive = false;
+
 	/* Retrieve capabilities from all connected nodes */
 	ret = update_capabilities(rec, nodemap);
 	if (ret != 0) {
@@ -3901,6 +3911,7 @@ static void monitor_cluster(struct ctdb_context *ctdb)
 	CTDB_NO_MEMORY_FATAL(ctdb, rec->recovery);
 
 	rec->priority_time = timeval_current();
+	rec->frozen_on_inactive = false;
 
 	/* register a message port for sending memory dumps */
 	ctdb_client_set_message_handler(ctdb, CTDB_SRVID_MEM_DUMP, mem_dump_handler, rec);


-- 
Samba Shared Repository



More information about the samba-cvs mailing list