Blame SOURCES/bz1745713-rabbitmq-cluster-5-ensure-node-attribures-removed.patch

b4b3ce
From 8ed87936e9ad06318cc49ea767885a405dfde11e Mon Sep 17 00:00:00 2001
b4b3ce
From: John Eckersberg <jeckersb@redhat.com>
b4b3ce
Date: Wed, 5 Dec 2018 11:45:43 -0500
b4b3ce
Subject: [PATCH] rabbitmq-cluster: better ensure node attributes are removed
b4b3ce
b4b3ce
Ensure that the attribute is removed at the end of the stop action.
b4b3ce
Also if rmq_app_running or rmq_node_alive shows the service as down,
b4b3ce
ensure the attribute is deleted as well.
b4b3ce
b4b3ce
Resolves: RHBZ#1656368
b4b3ce
---
b4b3ce
 heartbeat/rabbitmq-cluster | 3 +++
b4b3ce
 1 file changed, 3 insertions(+)
b4b3ce
b4b3ce
diff --git a/heartbeat/rabbitmq-cluster b/heartbeat/rabbitmq-cluster
b4b3ce
index 1643dd1e7..2dca3e216 100755
b4b3ce
--- a/heartbeat/rabbitmq-cluster
b4b3ce
+++ b/heartbeat/rabbitmq-cluster
b4b3ce
@@ -184,6 +184,7 @@ rmq_app_running() {
b4b3ce
 		return $OCF_SUCCESS
b4b3ce
 	else
b4b3ce
 		ocf_log debug "RabbitMQ application is stopped"
b4b3ce
+		rmq_delete_nodename
b4b3ce
 		return $OCF_NOT_RUNNING
b4b3ce
 	fi
b4b3ce
 }
b4b3ce
@@ -194,6 +195,7 @@ rmq_node_alive() {
b4b3ce
 		return $OCF_SUCCESS
b4b3ce
 	else
b4b3ce
 		ocf_log debug "RabbitMQ node is down"
b4b3ce
+		rmq_delete_nodename
b4b3ce
 		return $OCF_NOT_RUNNING
b4b3ce
 	fi
b4b3ce
 }
b4b3ce
@@ -554,6 +556,7 @@ rmq_stop() {
b4b3ce
 		sleep 1
b4b3ce
 	done
b4b3ce
 
b4b3ce
+	rmq_delete_nodename
b4b3ce
 	remove_pid
b4b3ce
 	return $OCF_SUCCESS
b4b3ce
 }