cluster: STABLE3 - cman: call corosync->request_shutdown on cman-tool leave

Christine Caulfield chrissie@fedoraproject.org
Mon May 18 14:31:00 GMT 2009


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=38810c9725b5295c2d97ae5034c421b65a5d9863
Commit:        38810c9725b5295c2d97ae5034c421b65a5d9863
Parent:        38fdddcb8d9efb2bc4dc22aed61ed940137fb0c8
Author:        Christine Caulfield <ccaulfie@redhat.com>
AuthorDate:    Mon May 18 15:28:43 2009 +0100
Committer:     Christine Caulfield <ccaulfie@redhat.com>
CommitterDate: Mon May 18 15:28:43 2009 +0100

cman: call corosync->request_shutdown on cman-tool leave

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
---
 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 */



More information about the Cluster-cvs mailing list