dlm: master - dlm_controld: fix handling of startup partition merge

David Teigland teigland at fedoraproject.org
Tue Feb 5 22:23:07 UTC 2013


Gitweb:        http://git.fedorahosted.org/git/?p=dlm.git;a=commitdiff;h=23b48a5cf204bee8f362f68733430f5c1330c7d0
Commit:        23b48a5cf204bee8f362f68733430f5c1330c7d0
Parent:        956ddcebf026e2c2b560c808984293502054ff16
Author:        David Teigland <teigland at redhat.com>
AuthorDate:    Thu Jan 31 13:09:29 2013 -0600
Committer:     David Teigland <teigland at redhat.com>
CommitterDate: Thu Jan 31 13:10:06 2013 -0600

dlm_controld: fix handling of startup partition merge

Nack messages are not matched correctly with previous change
structs.  Normal start messages should not be matched with
changes that preceeded the node's join time, but nack messages
should, so the match_change() function needs to distinguish.

This can occur when two nodes are joining a lockspace, but
neither has completed when a cluster partition+merge happens.

(copying fix from cluster.git
70b15e7afa730166ef0a3c81948d31ab1dd5aa93)

Signed-off-by: David Teigland <teigland at redhat.com>
---
 dlm_controld/action.c |    6 +++++-
 dlm_controld/cpg.c    |    9 ++++++++-
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/dlm_controld/action.c b/dlm_controld/action.c
index 64c3923..84637f1 100644
--- a/dlm_controld/action.c
+++ b/dlm_controld/action.c
@@ -336,7 +336,11 @@ int set_configfs_members(struct lockspace *ls, char *name,
 			if (rv) {
 				log_error("%s: renew rmdir failed: %d",
 					  path, errno);
-				goto out;
+
+				/* don't quit here, there's a case where
+				 * this can happen, where a node identified
+				 * for renewal was not really added
+				 * previously */
 			}
 		}
 
diff --git a/dlm_controld/cpg.c b/dlm_controld/cpg.c
index b299c6f..82dae3d 100644
--- a/dlm_controld/cpg.c
+++ b/dlm_controld/cpg.c
@@ -818,7 +818,14 @@ static int match_change(struct lockspace *ls, struct change *cg,
 			  "cluster add %llu", hd->nodeid, seq, cg->seq,
 			  (unsigned long long)cg->create_time,
 			  (unsigned long long)t);
-		return 0;
+
+		/* nacks can apply to older cg's */
+		if (!(hd->flags & DLM_MFLG_NACK)) {
+			return 0;
+		} else {
+			log_group(ls, "match_change %d:%u unskip cg %u for nack",
+				  hd->nodeid, seq, cg->seq);
+		}
 	}
 
 	if (node->last_match_seq > cg->seq) {


More information about the cluster-commits mailing list