summaryrefslogtreecommitdiff
path: root/packaging/common
diff options
context:
space:
mode:
authorBogdan Dobrelya <bdobrelia@mirantis.com>2015-12-10 13:32:21 +0100
committerBogdan Dobrelya <bdobrelia@mirantis.com>2015-12-10 17:09:11 +0100
commit550241932b1fda01ef2909e56c818d97ceec0452 (patch)
tree83104c453a9dbeb8c1d199b8ff696b4431bd7232 /packaging/common
parent06389b4f4a33cb94464d7d72a23ac848c6809082 (diff)
downloadrabbitmq-server-git-550241932b1fda01ef2909e56c818d97ceec0452.tar.gz
Fix the set_rabbitmq_policy.sh usage
* Call it only if exists * Address packaging: - for stable branch, use packaging/common/ to contain the set_rabbitmq_policy.sh and include it to the debian rules and rpm spec NOTE: for master branch landing please update as appropriate, as it should be using ./scripts source! Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
Diffstat (limited to 'packaging/common')
-rwxr-xr-xpackaging/common/rabbitmq-server-ha.ocf2
-rwxr-xr-xpackaging/common/set_rabbitmq_policy.sh5
2 files changed, 6 insertions, 1 deletions
diff --git a/packaging/common/rabbitmq-server-ha.ocf b/packaging/common/rabbitmq-server-ha.ocf
index 223e27f6f4..02f2a1780a 100755
--- a/packaging/common/rabbitmq-server-ha.ocf
+++ b/packaging/common/rabbitmq-server-ha.ocf
@@ -1733,7 +1733,7 @@ action_promote() {
fi
local set_policy_path="$(dirname $0)/set_rabbitmq_policy.sh"
- . $set_policy_path
+ [ -f $set_policy_path ] && . $set_policy_path
# create timestamp file
ocf_log info "${LH} Updating start timestamp"
diff --git a/packaging/common/set_rabbitmq_policy.sh b/packaging/common/set_rabbitmq_policy.sh
new file mode 100755
index 0000000000..a88b0c417a
--- /dev/null
+++ b/packaging/common/set_rabbitmq_policy.sh
@@ -0,0 +1,5 @@
+# This script is called by rabbitmq-server-ha.ocf during RabbitMQ
+# cluster start up. It is a convenient place to set your cluster
+# policy here, for example:
+# ${OCF_RESKEY_ctl} set_policy ha-all "." '{"ha-mode":"all", "ha-sync-mode":"automatic"}' --apply-to all --priority 0
+