From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26603 invoked by alias); 18 May 2009 14:31:00 -0000 Received: (qmail 26596 invoked by alias); 18 May 2009 14:30:59 -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 bastion2.fedora.phx.redhat.com Subject: cluster: STABLE3 - cman: call corosync->request_shutdown on cman-tool leave To: cluster-cvs-relay@redhat.com X-Project: Cluster Project X-Git-Module: cluster.git X-Git-Refname: refs/heads/STABLE3 X-Git-Reftype: branch X-Git-Oldrev: 38fdddcb8d9efb2bc4dc22aed61ed940137fb0c8 X-Git-Newrev: 38810c9725b5295c2d97ae5034c421b65a5d9863 From: Christine Caulfield Message-Id: <20090518142925.37CEB12020E@lists.fedorahosted.org> Date: Mon, 18 May 2009 14: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-q2/txt/msg00331.txt.bz2 Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=38810c9725b5295c2d97ae5034c421b65a5d9863 Commit: 38810c9725b5295c2d97ae5034c421b65a5d9863 Parent: 38fdddcb8d9efb2bc4dc22aed61ed940137fb0c8 Author: Christine Caulfield AuthorDate: Mon May 18 15:28:43 2009 +0100 Committer: Christine Caulfield CommitterDate: Mon May 18 15:28:43 2009 +0100 cman: call corosync->request_shutdown on cman-tool leave Signed-off-by: Christine Caulfield --- cman/daemon/ais.c | 5 +++++ cman/daemon/ais.h | 1 + cman/daemon/commands.c | 2 +- 3 files changed, 7 insertions(+), 1 deletions(-) diff --git a/cman/daemon/ais.c b/cman/daemon/ais.c index 6bd0d81..a1092c0 100644 --- a/cman/daemon/ais.c +++ b/cman/daemon/ais.c @@ -334,6 +334,11 @@ static void cman_confchg_fn(enum totem_configuration_type configuration_type, } } +void corosync_shutdown(void) +{ + corosync->request_shutdown(); +} + /* Write an error message down the CMAN startup pipe so that cman_tool can display it */ int write_cman_pipe(const char *message) diff --git a/cman/daemon/ais.h b/cman/daemon/ais.h index 8ee2285..44b1a8c 100644 --- a/cman/daemon/ais.h +++ b/cman/daemon/ais.h @@ -11,3 +11,4 @@ extern uint64_t incarnation; extern int num_ais_nodes; extern quorum_set_quorate_fn_t corosync_set_quorum; extern struct memb_ring_id cman_ring_id; +extern void corosync_shutdown(void); diff --git a/cman/daemon/commands.c b/cman/daemon/commands.c index 75b41fe..de0fefb 100644 --- a/cman/daemon/commands.c +++ b/cman/daemon/commands.c @@ -2056,7 +2056,7 @@ static void process_internal_message(char *data, int nodeid, int need_byteswap) if (shutdown_con) send_status_return(shutdown_con, CMAN_CMD_TRY_SHUTDOWN, 0); cman_finish(); - exit(0); + corosync_shutdown(); } /* Someone else, make a note of the reason for leaving */