summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBogdan Dobrelya <bdobrelia@mirantis.com>2015-07-24 11:25:23 +0200
committerBogdan Dobrelya <bdobrelia@mirantis.com>2015-07-24 11:25:23 +0200
commit46c8f80f1e99171db5d99e23488890c9e0bf090e (patch)
tree9af5796bec8a432336ae28be11ff1a5d98ad16f6
parentd333f44ee7806daa2f82632c755a1c06cef3c1ac (diff)
downloadrabbitmq-server-git-46c8f80f1e99171db5d99e23488890c9e0bf090e.tar.gz
Fix indentaion, typos, hardcodes
Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
-rwxr-xr-xpackaging/common/rabbitmq-server-ha.ocf22
-rw-r--r--packaging/debs/Debian/debian/rules2
2 files changed, 12 insertions, 12 deletions
diff --git a/packaging/common/rabbitmq-server-ha.ocf b/packaging/common/rabbitmq-server-ha.ocf
index bec891c235..8d9346b910 100755
--- a/packaging/common/rabbitmq-server-ha.ocf
+++ b/packaging/common/rabbitmq-server-ha.ocf
@@ -777,7 +777,7 @@ start_beam_process() {
return $OCF_ERR_GENERIC
fi
fi
- ocf_run rm -rf $OCF_RESKEY_pid_file
+ ocf_run rm -f $OCF_RESKEY_pid_file
fi
[ -f /etc/default/rabbitmq-server ] && . /etc/default/rabbitmq-server
@@ -1320,10 +1320,10 @@ action_notify() {
echo "$d [notify] ${OCF_RESKEY_CRM_meta_notify_type}-${OCF_RESKEY_CRM_meta_notify_operation} promote='${OCF_RESKEY_CRM_meta_notify_promote_uname}' demote='${OCF_RESKEY_CRM_meta_notify_demote_uname}' master='${OCF_RESKEY_CRM_meta_notify_master_uname}' slave='${OCF_RESKEY_CRM_meta_notify_slave_uname}' start='${OCF_RESKEY_CRM_meta_notify_start_uname}' stop='${OCF_RESKEY_CRM_meta_notify_stop_uname}' active='${OCF_RESKEY_CRM_meta_notify_active_uname}' inactive='${OCF_RESKEY_CRM_meta_notify_inactive_uname}'" >> /tmp/rmq-ocf.log
fi
- if [ "${OCF_RESKEY_CRM_meta_notify_type}" = 'pre' ] ; then
- # PRE- anything notify section
- case "$OCF_RESKEY_CRM_meta_notify_operation" in
- promote)
+ if [ "${OCF_RESKEY_CRM_meta_notify_type}" = 'pre' ] ; then
+ # PRE- anything notify section
+ case "$OCF_RESKEY_CRM_meta_notify_operation" in
+ promote)
ocf_log info "${LH} pre-promote begin."
my_host "$OCF_RESKEY_CRM_meta_notify_promote_uname"
rc=$?
@@ -1338,7 +1338,7 @@ action_notify() {
;;
*)
;;
- esac
+ esac
fi
if [ "${OCF_RESKEY_CRM_meta_notify_type}" = 'post' ] ; then
@@ -1353,7 +1353,7 @@ action_notify() {
return $OCF_NOT_RUNNING
fi
# Note, this should fail when the mnesia is inconsistent.
- # For example, when the "old" master processing the promition of the new one.
+ # For example, when the "old" master processing the promotion of the new one.
# Later this ex-master node will rejoin the cluster at post-start.
jjj_join "${OCF_RESKEY_CRM_meta_notify_promote_uname}"
rc=$?
@@ -1498,10 +1498,10 @@ action_promote() {
exit $OCF_FAILED_MASTER
fi
ocf_log info "${LH} Setting HA policy for all queues"
- rabbitmqctl set_policy ha-all "." '{"ha-mode":"all", "ha-sync-mode":"automatic"}' --apply-to all --priority 0
- rabbitmqctl set_policy heat_rpc_expire "^heat-engine-listener\\." '{"expires":3600000,"ha-mode":"all","ha-sync-mode":"automatic"}' --apply-to all --priority 1
- rabbitmqctl set_policy results_expire "^results\\." '{"expires":3600000,"ha-mode":"all","ha-sync-mode":"automatic"}' --apply-to all --priority 1
- rabbitmqctl set_policy tasks_expire "^tasks\\." '{"expires":3600000,"ha-mode":"all","ha-sync-mode":"automatic"}' --apply-to all --priority 1
+ ${OCF_RESKEY_ctl} set_policy ha-all "." '{"ha-mode":"all", "ha-sync-mode":"automatic"}' --apply-to all --priority 0
+ ${OCF_RESKEY_ctl} set_policy heat_rpc_expire "^heat-engine-listener\\." '{"expires":3600000,"ha-mode":"all","ha-sync-mode":"automatic"}' --apply-to all --priority 1
+ ${OCF_RESKEY_ctl} set_policy results_expire "^results\\." '{"expires":3600000,"ha-mode":"all","ha-sync-mode":"automatic"}' --apply-to all --priority 1
+ ${OCF_RESKEY_ctl} set_policy tasks_expire "^tasks\\." '{"expires":3600000,"ha-mode":"all","ha-sync-mode":"automatic"}' --apply-to all --priority 1
# create timestamp file
ocf_log info "${LH} Updating start timestamp"
ocf_run crm_attribute -N $THIS_PCMK_NODE -l reboot --name 'rabbit-start-time' --update $(now)
diff --git a/packaging/debs/Debian/debian/rules b/packaging/debs/Debian/debian/rules
index 1a15928bdf..434172defc 100644
--- a/packaging/debs/Debian/debian/rules
+++ b/packaging/debs/Debian/debian/rules
@@ -19,7 +19,7 @@ install/rabbitmq-server::
done
sed -e 's|@RABBIT_LIB@|/usr/lib/rabbitmq/lib/rabbitmq_server-$(DEB_UPSTREAM_VERSION)|g' <debian/postrm.in >debian/postrm
install -p -D -m 0755 debian/rabbitmq-server.ocf $(DEB_DESTDIR)usr/lib/ocf/resource.d/rabbitmq/rabbitmq-server
- install -p -D -m 0755 debian/rabbitmq-server-ha.ocf $(DEB_DESTDIR)usr/lib/ocf/resource.d/rabbitmq/rabbitmq-server-ha
+ install -p -D -m 0755 debian/rabbitmq-server-ha.ocf $(DEB_DESTDIR)usr/lib/ocf/resource.d/rabbitmq/rabbitmq-server-ha
install -p -D -m 0644 debian/rabbitmq-server.default $(DEB_DESTDIR)etc/default/rabbitmq-server
clean::