[SCM] Samba Shared Repository - branch master updated

Amitay Isaacs amitay at samba.org
Tue Oct 6 04:33:05 UTC 2020


The branch, master has been updated
       via  b68105b8f7c ctdb-tests: Strengthen node state checking in ctdb disable/enable test
       via  4b01f54041d ctdb-recoverd: Drop unnecessary and broken code
       via  3ab52b52867 ctdb-recoverd: Drop unnecessary code
      from  5cfc9271e4e third_party: Update gpfs.h to 5.0.5.3 version

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


- Log -----------------------------------------------------------------
commit b68105b8f7c20692d23d457f2777edcf44f12bb8
Author: Martin Schwenke <martin at meltin.net>
Date:   Wed Sep 30 10:48:38 2020 +1000

    ctdb-tests: Strengthen node state checking in ctdb disable/enable test
    
    Check that the desired state is set on all nodes instead of just the
    test node.  This ensures that node flags have correctly propagated
    across the cluster.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14513
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    
    Autobuild-User(master): Amitay Isaacs <amitay at samba.org>
    Autobuild-Date(master): Tue Oct  6 04:32:06 UTC 2020 on sn-devel-184

commit 4b01f54041dee469971f244e64064eed46de2ed5
Author: Martin Schwenke <martin at meltin.net>
Date:   Tue Jan 16 15:15:51 2018 +1100

    ctdb-recoverd: Drop unnecessary and broken code
    
    update_flags() has already updated the recovery master's canonical
    node map, based on the flags from each remote node, and pushed out
    these flags to all nodes.
    
    If i == j then the node map has already been updated from this remote
    node's flags, so simply drop this case.
    
    Although update_flags() has updated flags for all nodes, it did not
    update each node map in remote_nodemaps[] to reflect this.  This means
    that remote_nodemaps[] may contain inconsistent flags for some nodes
    so it should not be used to check consistency when i != j.
    
    Further, a meaningful difference in flags can only really occur if
    update_flags() failed.  In that case this code is never reached.
    
    These observations combine to imply that this whole loop should be
    dropped.
    
    This leaves potential sub-second inconsistencies due to out-of-band
    healthy/unhealthy flag changes pushed via CTDB_SRVID_PUSH_NODE_FLAGS.
    These updates could be dropped (takeover run asks each node for
    available IPs rather than making centralised decisions based on node
    flags) but for now they will be fixed in the next iteration of
    main_loop().
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14513
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 3ab52b528673e08caa66f00e963528c591a84fe1
Author: Martin Schwenke <martin at meltin.net>
Date:   Fri Jan 19 14:55:21 2018 +1100

    ctdb-recoverd: Drop unnecessary code
    
    This has already been done in update_flags().
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14513
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

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

Summary of changes:
 ctdb/server/ctdb_recoverd.c                        | 61 ----------------------
 .../failover/pubips.030.disable_enable.sh          |  4 +-
 2 files changed, 2 insertions(+), 63 deletions(-)


Changeset truncated at 500 lines:

diff --git a/ctdb/server/ctdb_recoverd.c b/ctdb/server/ctdb_recoverd.c
index aeb23276fe7..4ba8729b50e 100644
--- a/ctdb/server/ctdb_recoverd.c
+++ b/ctdb/server/ctdb_recoverd.c
@@ -2669,67 +2669,6 @@ static void main_loop(struct ctdb_context *ctdb, struct ctdb_recoverd *rec,
 		}
 	}
 
-	/*
-	 * Update node flags obtained from each active node. This ensure we have
-	 * up-to-date information for all the nodes.
-	 */
-	for (j=0; j<nodemap->num; j++) {
-		if (nodemap->nodes[j].pnn == ctdb->pnn) {
-			continue;
-		}
-		if (nodemap->nodes[j].flags & NODE_FLAGS_INACTIVE) {
-			continue;
-		}
-		nodemap->nodes[j].flags = remote_nodemaps[j]->nodes[j].flags;
-	}
-
-	for (j=0; j<nodemap->num; j++) {
-		if (nodemap->nodes[j].pnn == ctdb->pnn) {
-			continue;
-		}
-		if (nodemap->nodes[j].flags & NODE_FLAGS_INACTIVE) {
-			continue;
-		}
-
-		/* verify the flags are consistent
-		*/
-		for (i=0; i<nodemap->num; i++) {
-			if (nodemap->nodes[i].flags & NODE_FLAGS_DISCONNECTED) {
-				continue;
-			}
-			
-			if (nodemap->nodes[i].flags != remote_nodemaps[j]->nodes[i].flags) {
-				DEBUG(DEBUG_ERR, (__location__ " Remote node:%u has different flags for node %u. It has 0x%02x vs our 0x%02x\n", 
-				  nodemap->nodes[j].pnn, 
-				  nodemap->nodes[i].pnn, 
-				  remote_nodemaps[j]->nodes[i].flags,
-				  nodemap->nodes[i].flags));
-				if (i == j) {
-					DEBUG(DEBUG_ERR,("Use flags 0x%02x from remote node %d for cluster update of its own flags\n", remote_nodemaps[j]->nodes[i].flags, j));
-					update_flags_on_all_nodes(
-					    rec,
-					    nodemap->nodes[i].pnn,
-					    remote_nodemaps[j]->nodes[i].flags);
-					ctdb_set_culprit(rec, nodemap->nodes[j].pnn);
-					do_recovery(rec, mem_ctx, pnn, nodemap, 
-						    vnnmap);
-					return;
-				} else {
-					DEBUG(DEBUG_ERR,("Use flags 0x%02x from local recmaster node for cluster update of node %d flags\n", nodemap->nodes[i].flags, i));
-					update_flags_on_all_nodes(
-						rec,
-						nodemap->nodes[i].pnn,
-						nodemap->nodes[i].flags);
-					ctdb_set_culprit(rec, nodemap->nodes[j].pnn);
-					do_recovery(rec, mem_ctx, pnn, nodemap, 
-						    vnnmap);
-					return;
-				}
-			}
-		}
-	}
-
-
 	/* count how many active nodes there are */
 	num_lmasters  = 0;
 	for (i=0; i<nodemap->num; i++) {
diff --git a/ctdb/tests/INTEGRATION/failover/pubips.030.disable_enable.sh b/ctdb/tests/INTEGRATION/failover/pubips.030.disable_enable.sh
index 9a1616ceefc..3f400975e66 100755
--- a/ctdb/tests/INTEGRATION/failover/pubips.030.disable_enable.sh
+++ b/ctdb/tests/INTEGRATION/failover/pubips.030.disable_enable.sh
@@ -14,10 +14,10 @@ select_test_node_and_ips
 
 echo "Disabling node $test_node"
 try_command_on_node 1 $CTDB disable -n $test_node
-wait_until_node_has_status $test_node disabled
+wait_until_node_has_status $test_node disabled 30 all
 wait_until_node_has_no_ips "$test_node"
 
 echo "Re-enabling node $test_node"
 try_command_on_node 1 $CTDB enable -n $test_node
-wait_until_node_has_status $test_node enabled
+wait_until_node_has_status $test_node enabled 30 all
 wait_until_node_has_some_ips "$test_node"


-- 
Samba Shared Repository



More information about the samba-cvs mailing list