Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=62a5ab048683b…
Commit: 62a5ab048683b4ce77f0eeaba81d3330da574d41
Parent: 8b67fbb6e5e95510fcecbdd5cd5a91aa88f97750
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Fri Jan 4 11:44:13 2013 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Fri May 10 09:41:41 2013 -0500
fenced/dlm_controld/gfs_controld: use cluster_dead for corosync connections
corosync connections are supposed to use the
cluster_dead() function, not the client_dead()
function. The client_dead() function closes
the fd directly, which in the case of corosync
connections, fouls up the ipc, because the ipc
is still expecting to use that fd, which the
daemon has reused for something else. The next
time the daemon calls into corosync ipc, it gets
stuck in a poll/futex loop as the lib attempts
to use the fd that fenced has wrongly closed.
bz 888857
Signed-off-by: David Teigland <teigland(a)redhat.com>
---
fence/fenced/cpg.c | 2 +-
group/dlm_controld/cpg.c | 2 +-
group/gfs_controld/cpg-new.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/fence/fenced/cpg.c b/fence/fenced/cpg.c
index 6634f8c..a5a4208 100644
--- a/fence/fenced/cpg.c
+++ b/fence/fenced/cpg.c
@@ -1748,7 +1748,7 @@ int fd_join(struct fd *fd)
cpg_fd_get(cpg_handle_domain, &cpg_fd_domain);
- ci = client_add(cpg_fd_domain, process_cpg_domain, NULL);
+ ci = client_add(cpg_fd_domain, process_cpg_domain, cluster_dead);
list_add(&fd->list, &domains);
fd->cpg_handle = cpg_handle_domain;
diff --git a/group/dlm_controld/cpg.c b/group/dlm_controld/cpg.c
index 4463f4d..6a4023b 100644
--- a/group/dlm_controld/cpg.c
+++ b/group/dlm_controld/cpg.c
@@ -1822,7 +1822,7 @@ int dlm_join_lockspace(struct lockspace *ls)
cpg_fd_get(h, &fd);
- ci = client_add(fd, process_cpg_lockspace, NULL);
+ ci = client_add(fd, process_cpg_lockspace, cluster_dead);
list_add(&ls->list, &lockspaces);
diff --git a/group/gfs_controld/cpg-new.c b/group/gfs_controld/cpg-new.c
index 0cdfaae..537624d 100644
--- a/group/gfs_controld/cpg-new.c
+++ b/group/gfs_controld/cpg-new.c
@@ -2773,7 +2773,7 @@ int gfs_join_mountgroup(struct mountgroup *mg)
cpg_fd_get(h, &fd);
- ci = client_add(fd, process_cpg_mountgroup, NULL);
+ ci = client_add(fd, process_cpg_mountgroup, cluster_dead);
mg->cpg_handle = h;
mg->cpg_client = ci;
Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=8b67fbb6e5e95…
Commit: 8b67fbb6e5e95510fcecbdd5cd5a91aa88f97750
Parent: f50e499e44e5c7f1920e93c9b26b61c8c8468d48
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Thu Jan 3 13:35:54 2013 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Thu May 9 10:13:16 2013 -0500
gfs_controld: avoid mismatching messages with old cgs
Only match start messages with cg's that are newer than
previously matched cg's for the node.
bz 889564
Signed-off-by: David Teigland <teigland(a)redhat.com>
---
group/gfs_controld/cpg-new.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/group/gfs_controld/cpg-new.c b/group/gfs_controld/cpg-new.c
index fd20250..0cdfaae 100644
--- a/group/gfs_controld/cpg-new.c
+++ b/group/gfs_controld/cpg-new.c
@@ -121,6 +121,7 @@ struct node {
int failed_reason;
uint32_t added_seq;
uint32_t removed_seq;
+ uint32_t last_match_seq;
uint64_t add_time;
int withdraw;
@@ -1001,6 +1002,15 @@ static int match_change(struct mountgroup *mg, struct change *cg,
return 0;
}
+ /* if we matched the last start message from this node against our
+ cg N, then don't match this stsart message against an earlier cg */
+
+ if (node->last_match_seq > cg->seq) {
+ log_debug("match_change %d:%u skip cg %u last matched cg %u",
+ hd->nodeid, seq, cg->seq, node->last_match_seq);
+ return 0;
+ }
+
/* verify this is the right change by matching the counts
and the nodeids of the current members */
@@ -1035,6 +1045,8 @@ static int match_change(struct mountgroup *mg, struct change *cg,
if (members_mismatch)
return 0;
+ node->last_match_seq = cg->seq;
+
log_group(mg, "match_change %d:%u matches cg %u", hd->nodeid, seq,
cg->seq);
return 1;