From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24098 invoked by alias); 13 Mar 2009 21:31:14 -0000 Received: (qmail 24092 invoked by alias); 13 Mar 2009 21:31:14 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS X-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS X-Spam-Check-By: sourceware.org X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bastion.fedora.phx.redhat.com Subject: fence: master - fenced: fix accounting for startup fencing victims To: cluster-cvs-relay@redhat.com X-Project: Cluster Project X-Git-Module: fence.git X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 5300fc8e07c2297e295c4f7ebd9996fa1f064558 X-Git-Newrev: 0d0d4115d32e71f6c418ab040e86d2d377d792e7 From: David Teigland Message-Id: <20090313213054.31FC312015A@lists.fedorahosted.org> Date: Fri, 13 Mar 2009 21:31:00 -0000 X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 Mailing-List: contact cluster-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cluster-cvs-owner@sourceware.org X-SW-Source: 2009-q1/txt/msg00788.txt.bz2 Gitweb: http://git.fedorahosted.org/git/fence.git?p=fence.git;a=commitdiff;h=0d0d4115d32e71f6c418ab040e86d2d377d792e7 Commit: 0d0d4115d32e71f6c418ab040e86d2d377d792e7 Parent: 5300fc8e07c2297e295c4f7ebd9996fa1f064558 Author: David Teigland AuthorDate: Fri Mar 13 16:25:31 2009 -0500 Committer: David Teigland 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 --- 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)