OCF RA: Do not start rabbitmq if notification of start is not about us

Right now, every time we get a start notification, all nodes will ensure
the rabbitmq app is started. This makes little sense, as nodes that are
already active don't need to do that.

On top of that, this had the sideeffect of updating the start time for
each of these nodes, which could result in the master moving to another
node.
This commit is contained in:
Vincent Untz 2017-12-08 14:15:24 +01:00
parent a8e7a62513
commit 2f284bf595
1 changed files with 1 additions and 2 deletions

View File

@ -2182,7 +2182,6 @@ action_notify() {
;;
start)
ocf_log info "${LH} post-start begin."
local nodes_list="${OCF_RESKEY_CRM_meta_notify_start_uname} ${OCF_RESKEY_CRM_meta_notify_active_uname}"
# Do nothing, if the list of nodes being started or running reported empty
# Delegate recovery, if needed, to the "running out of the cluster" monitor's logic
if [ -z "${OCF_RESKEY_CRM_meta_notify_start_uname}" -a -z "${OCF_RESKEY_CRM_meta_notify_active_uname}" ] ; then
@ -2191,7 +2190,7 @@ action_notify() {
return $OCF_SUCCESS
fi
# check did this event from this host
my_host "${nodes_list}"
my_host "${OCF_RESKEY_CRM_meta_notify_start_uname}"
rc=$?
# Do nothing, if there is no master reported
# Delegate recovery, if needed, to the "running out of the cluster" monitor's logic