public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* cluster: STABLE3 - fenced: fix accounting for startup fencing victims
@ 2009-03-13 21:30 David Teigland
  0 siblings, 0 replies; only message in thread
From: David Teigland @ 2009-03-13 21:30 UTC (permalink / raw)
  To: cluster-cvs-relay

Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=1db6b820a615574fc9eddf1b7939f9133336a9d2
Commit:        1db6b820a615574fc9eddf1b7939f9133336a9d2
Parent:        cd879b4f79093eededdd21d24875039a3adf5999
Author:        David Teigland <teigland@redhat.com>
AuthorDate:    Fri Mar 13 16:25:31 2009 -0500
Committer:     David Teigland <teigland@redhat.com>
CommitterDate: Fri Mar 13 16:25:31 2009 -0500

fenced: fix accounting for startup fencing victims

Startup fencing victims had no node_history struct, so errors were
produced when the fencing completed and we tried to record the result.

Signed-off-by: David Teigland <teigland@redhat.com>
---
 fence/fenced/cpg.c     |    2 +-
 fence/fenced/fd.h      |    1 +
 fence/fenced/recover.c |    5 +++++
 3 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/fence/fenced/cpg.c b/fence/fenced/cpg.c
index 0218006..5d6aa96 100644
--- a/fence/fenced/cpg.c
+++ b/fence/fenced/cpg.c
@@ -235,7 +235,7 @@ static struct node_history *get_node_history(struct fd *fd, int nodeid)
 	return NULL;
 }
 
-static void node_history_init(struct fd *fd, int nodeid)
+void node_history_init(struct fd *fd, int nodeid)
 {
 	struct node_history *node;
 
diff --git a/fence/fenced/fd.h b/fence/fenced/fd.h
index ed2b318..117b090 100644
--- a/fence/fenced/fd.h
+++ b/fence/fenced/fd.h
@@ -203,6 +203,7 @@ int setup_cpg(void);
 void close_cpg(void);
 int set_protocol(void);
 void free_cg(struct change *cg);
+void node_history_init(struct fd *fd, int nodeid);
 void node_history_fence(struct fd *fd, int victim, int master, int how,
 			uint64_t mastertime);
 void send_external(struct fd *fd, int victim);
diff --git a/fence/fenced/recover.c b/fence/fenced/recover.c
index f75217c..dc0297c 100644
--- a/fence/fenced/recover.c
+++ b/fence/fenced/recover.c
@@ -18,6 +18,11 @@ void add_complete_node(struct fd *fd, int nodeid)
 
 	node = get_new_node(fd, nodeid);
 	list_add(&node->list, &fd->complete);
+
+	if (group_mode == GROUP_LIBGROUP)
+		return;
+
+	node_history_init(fd, nodeid);
 }
 
 int list_count(struct list_head *head)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-03-13 21:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-13 21:30 cluster: STABLE3 - fenced: fix accounting for startup fencing victims David Teigland

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).