summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMichael Klishin <mklishin@pivotal.io>2016-02-19 15:30:23 +0300
committerMichael Klishin <mklishin@pivotal.io>2016-02-19 15:30:23 +0300
commit58313b7f8bb358fd60ed639cbd71274843eecd53 (patch)
treeb93be267ac0b9e51d0bc2ff4c8abc103e56dbc1a /scripts
parent3a57615bd41dd77aa50577c2a3788972d7eb958c (diff)
parentd68b89294d1b0b806b353f246b8058078efc776a (diff)
downloadrabbitmq-server-git-58313b7f8bb358fd60ed639cbd71274843eecd53.tar.gz
Merge branch 'stable'
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/rabbitmq-server-ha.ocf20
1 files changed, 11 insertions, 9 deletions
diff --git a/scripts/rabbitmq-server-ha.ocf b/scripts/rabbitmq-server-ha.ocf
index 5505c10581..2f57339703 100755
--- a/scripts/rabbitmq-server-ha.ocf
+++ b/scripts/rabbitmq-server-ha.ocf
@@ -932,6 +932,8 @@ unjoin_nodes_from_cluster() {
if get_running_nodes | grep -q $(rabbit_node_name $nodename)
then
ocf_log info "${LH} the ${nodename} is alive and cannot be kicked from the cluster yet"
+ else
+ break
fi
sleep 10
done
@@ -1321,18 +1323,18 @@ is_master() {
# separately. The second argument is used to distingush them.
check_timeouts() {
local op_rc=$1
- local crm_attr_name=$2
+ local timeouts_attr_name=$2
local op_name=$3
if [ $op_rc -ne 124 -a $op_rc -ne 137 ]; then
- ocf_run crm_attribute -N $THIS_PCMK_NODE -l reboot --name $crm_attr_name --update 0
+ ocf_run attrd_updater -p --name $timeouts_attr_name --update 0
return 0
fi
local count
- count=`crm_attribute -N $THIS_PCMK_NODE -l reboot --name $crm_attr_name --query 2>/dev/null`
+ count=`attrd_updater --name $timeouts_attr_name --query 2>/dev/null`
if [ $? -ne 0 ]; then
- # the crm_attribute exited with error. In that case most probably it printed garbage
+ # the attrd_updater exited with error. In that case most probably it printed garbage
# instead of the number we need. So defensively assume that it is zero.
count=0
@@ -1341,9 +1343,9 @@ check_timeouts() {
count=$((count+1))
# There is a slight chance that this piece of code will be executed twice simultaneously.
- # As a result, $crm_attr_name's value will be one less than it should be. But we don't need
+ # As a result, $timeouts_attr_name's value will be one less than it should be. But we don't need
# precise calculation here.
- ocf_run crm_attribute -N $THIS_PCMK_NODE -l reboot --name $crm_attr_name --update $count
+ ocf_run attrd_updater -p --name $timeouts_attr_name --update $count
if [ $count -lt $OCF_RESKEY_max_rabbitmqctl_timeouts ]; then
ocf_log warn "${LH} 'rabbitmqctl $op_name' timed out $count of max. $OCF_RESKEY_max_rabbitmqctl_timeouts time(s) in a row. Doing nothing for now."
@@ -1643,9 +1645,9 @@ action_start() {
return $OCF_SUCCESS
fi
- ocf_run crm_attribute -N $THIS_PCMK_NODE -l reboot --name 'rabbit_list_channels_timeouts' --update '0'
- ocf_run crm_attribute -N $THIS_PCMK_NODE -l reboot --name 'rabbit_get_alarms_timeouts' --update '0'
- ocf_run crm_attribute -N $THIS_PCMK_NODE -l reboot --name 'rabbit_list_queues_timeouts' --update '0'
+ ocf_run attrd_updater -p --name 'rabbit_list_channels_timeouts' --update '0'
+ ocf_run attrd_updater -p --name 'rabbit_get_alarms_timeouts' --update '0'
+ ocf_run attrd_updater -p --name 'rabbit_list_queues_timeouts' --update '0'
ocf_log info "${LH} Deleting start time attribute"
ocf_run crm_attribute -N $THIS_PCMK_NODE -l reboot --name 'rabbit-start-time' --delete
ocf_log info "${LH} Deleting master attribute"