public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
From: David Teigland <teigland@fedoraproject.org>
To: cluster-cvs-relay@redhat.com
Subject: cluster: STABLE3 - fenced: fix accounting for startup fencing victims
Date: Fri, 13 Mar 2009 21:30:00 -0000	[thread overview]
Message-ID: <20090313213021.9E4F412015A@lists.fedorahosted.org> (raw)

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)


                 reply	other threads:[~2009-03-13 21:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090313213021.9E4F412015A@lists.fedorahosted.org \
    --to=teigland@fedoraproject.org \
    --cc=cluster-cvs-relay@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).