5d6281263a
Otherwise an error is printed into lrmd.log on each script invokation, see the referenced bug for details. The correct OCF_FUNCTIONS_DIR setup is taken from the original RabbitMQ OCF script. Change-Id: Ice31967698d0e3c0d35e25728115d040927a9d26 Closes-Bug: #1616161
42 lines
1.5 KiB
Bash
42 lines
1.5 KiB
Bash
#!/bin/bash
|
|
|
|
# needed for ocf_log
|
|
: ${OCF_FUNCTIONS_DIR=${OCF_ROOT}/lib/heartbeat}
|
|
. ${OCF_FUNCTIONS_DIR}/ocf-shellfuncs
|
|
|
|
OCF_RESKEY_enable_rpc_ha_default=false
|
|
: ${OCF_RESKEY_enable_rpc_ha=${OCF_RESKEY_enable_rpc_ha_default}}
|
|
|
|
OCF_RESKEY_enable_notifications_ha_default=true
|
|
: ${OCF_RESKEY_enable_notifications_ha=${OCF_RESKEY_enable_notifications_ha_default}}
|
|
|
|
read -d '' EXTENDED_OCF_PARAMS << EOF
|
|
<parameter name="enable_rpc_ha" unique="0" required="0">
|
|
<longdesc lang="en">
|
|
Set ha-mode=all policy for RPC queues. Note that Ceilometer queues are not
|
|
affected by this flag.
|
|
</longdesc>
|
|
<shortdesc lang="en">Set ha-mode=all policy for RPC queues</shortdesc>
|
|
<content type="boolean" default="${OCF_RESKEY_enable_rpc_ha_default}" />
|
|
</parameter>
|
|
|
|
<parameter name="enable_notifications_ha" unique="0" required="0">
|
|
<longdesc lang="en">
|
|
Set ha-mode=all policy for Ceilometer queues. Note that RPC queues are not
|
|
affected by this flag.
|
|
</longdesc>
|
|
<shortdesc lang="en">Set ha-mode=all policy for Ceilometer queues</shortdesc>
|
|
<content type="boolean" default="${OCF_RESKEY_enable_notifications_ha_default}" />
|
|
</parameter>
|
|
EOF
|
|
|
|
upstream_rabbitmq_ocf_script="${OCF_ROOT}/resource.d/rabbitmq/rabbitmq-server-ha"
|
|
|
|
# if we haven't installed the upstream script, clearly we cannot be running.
|
|
if ! test -f $upstream_rabbitmq_ocf_script ; then
|
|
ocf_log err "rabbitmq-server upstream ocf script not present ${upstream_rabbitmq_ocf_script}"
|
|
exit $OCF_NOT_RUNNING
|
|
fi
|
|
|
|
. $upstream_rabbitmq_ocf_script
|