diff options
| author | Michael Klishin <michael@novemberain.com> | 2016-03-11 18:08:56 +0300 |
|---|---|---|
| committer | Michael Klishin <michael@novemberain.com> | 2016-03-11 18:08:56 +0300 |
| commit | 9a02ab05715068740cb125123a271a8f705a6bde (patch) | |
| tree | f6bdfbce4af109e3abebcc3304820585b33c2c1f | |
| parent | 2ed6627c178b22851ad359f2243a4d474a2e46e5 (diff) | |
| parent | 2f67cb5c1c82a929a56fa9996773150a9ec49837 (diff) | |
| download | rabbitmq-server-git-9a02ab05715068740cb125123a271a8f705a6bde.tar.gz | |
Merge pull request #685 from bogdando/bug/1556123
Revert "Private attributes usage in rabbitmq script"
| -rwxr-xr-x | scripts/rabbitmq-server-ha.ocf | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/scripts/rabbitmq-server-ha.ocf b/scripts/rabbitmq-server-ha.ocf index 2cfe16bae9..c6d0e26241 100755 --- a/scripts/rabbitmq-server-ha.ocf +++ b/scripts/rabbitmq-server-ha.ocf @@ -1348,18 +1348,18 @@ is_master() { # separately. The second argument is used to distingush them. check_timeouts() { local op_rc=$1 - local timeouts_attr_name=$2 + local crm_attr_name=$2 local op_name=$3 if [ $op_rc -ne 124 -a $op_rc -ne 137 ]; then - ocf_run attrd_updater -p --name $timeouts_attr_name --update 0 + ocf_run crm_attribute -N $THIS_PCMK_NODE -l reboot --name $crm_attr_name --update 0 return 0 fi local count - count=`attrd_updater --name $timeouts_attr_name --query 2>/dev/null` + count=`crm_attribute -N $THIS_PCMK_NODE -l reboot --name $crm_attr_name --query 2>/dev/null` if [ $? -ne 0 ]; then - # the attrd_updater exited with error. In that case most probably it printed garbage + # the crm_attribute 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 @@ -1368,9 +1368,9 @@ check_timeouts() { count=$((count+1)) # There is a slight chance that this piece of code will be executed twice simultaneously. - # As a result, $timeouts_attr_name's value will be one less than it should be. But we don't need + # As a result, $crm_attr_name's value will be one less than it should be. But we don't need # precise calculation here. - ocf_run attrd_updater -p --name $timeouts_attr_name --update $count + ocf_run crm_attribute -N $THIS_PCMK_NODE -l reboot --name $crm_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." @@ -1658,9 +1658,9 @@ action_start() { return $OCF_SUCCESS fi - 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_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_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" |
