public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* fence: master - fenced: fix accounting for startup fencing victims
@ 2009-03-13 21:31 David Teigland
0 siblings, 0 replies; only message in thread
From: David Teigland @ 2009-03-13 21:31 UTC (permalink / raw)
To: cluster-cvs-relay
Gitweb: http://git.fedorahosted.org/git/fence.git?p=fence.git;a=commitdiff;h=0d0d4115d32e71f6c418ab040e86d2d377d792e7
Commit: 0d0d4115d32e71f6c418ab040e86d2d377d792e7
Parent: 5300fc8e07c2297e295c4f7ebd9996fa1f064558
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:27:28 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 05db9b0..cf15579 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 a89b1fc..4caeba3 100644
--- a/fence/fenced/fd.h
+++ b/fence/fenced/fd.h
@@ -188,6 +188,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 1a4e469..6f47f8d 100644
--- a/fence/fenced/recover.c
+++ b/fence/fenced/recover.c
@@ -37,6 +37,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:31 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:31 fence: master - 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).