pacemaker/cman-disconnect.patch
2011-04-27 12:14:45 +02:00

68 lines
1.9 KiB
Diff

exporting patch:
# HG changeset patch
# User Andrew Beekhof <andrew@beekhof.net>
# Date 1300351285 -3600
# Node ID 2916bb5363e14eb130be3658faac77b58a61b600
# Parent f3a9f8559c10b1c53b9c09f1d439194fe47f0fcb
High: ais: Correctly disconnect from Corosync and Cman based clusters
diff -r f3a9f8559c10 -r 2916bb5363e1 crmd/control.c
--- a/crmd/control.c Thu Mar 17 09:44:08 2011 +0100
+++ b/crmd/control.c Thu Mar 17 09:41:25 2011 +0100
@@ -26,6 +26,7 @@
#include <crm/pengine/rules.h>
#include <crm/common/cluster.h>
+#include "../lib/common/stack.h"
#include <crmd.h>
#include <crmd_fsa.h>
@@ -65,7 +66,9 @@ do_ha_control(long long action,
if(action & A_HA_DISCONNECT) {
if(is_openais_cluster()) {
crm_peer_destroy();
+ terminate_ais_connection();
crm_info("Disconnected from OpenAIS");
+
#if SUPPORT_HEARTBEAT
} else if(fsa_cluster_conn != NULL) {
set_bit_inplace(fsa_input_register, R_HA_DISCONNECTED);
diff -r f3a9f8559c10 -r 2916bb5363e1 lib/common/ais.c
--- a/lib/common/ais.c Thu Mar 17 09:44:08 2011 +0100
+++ b/lib/common/ais.c Thu Mar 17 09:41:25 2011 +0100
@@ -408,23 +408,23 @@ void terminate_ais_connection(void)
/* G_main_del_fd(ais_source); */
/* G_main_del_fd(ais_source_sync); */
+ if(is_classic_ais_cluster() == FALSE) {
+ coroipcc_service_disconnect(ais_ipc_handle);
+
+ } else {
+ cpg_leave(pcmk_cpg_handle, &pcmk_cpg_group);
+ }
+
+ if(is_corosync_cluster()) {
+ quorum_finalize(pcmk_quorum_handle);
+ }
+
#ifdef SUPPORT_CMAN
if(is_cman_cluster()) {
cman_stop_notification(pcmk_cman_handle);
cman_finish(pcmk_cman_handle);
}
#endif
-
- if(is_corosync_cluster()) {
- quorum_finalize(pcmk_quorum_handle);
- }
-
- if(is_classic_ais_cluster() == FALSE) {
- coroipcc_service_disconnect(ais_ipc_handle);
-
- } else {
- cpg_leave(pcmk_cpg_handle, &pcmk_cpg_group);
- }
}
int ais_membership_timer = 0;