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

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