summaryrefslogtreecommitdiff
path: root/scripts/rabbitmq-server-ha.ocf
diff options
context:
space:
mode:
authorMichael Klishin <michael@novemberain.com>2016-03-07 13:59:48 +0300
committerMichael Klishin <michael@novemberain.com>2016-03-07 13:59:48 +0300
commita4fb78fec4517570988b79c0c8b1cebc32c17a1c (patch)
treeba818086fb95b8e1cc0eddc45512170e02cc2ce6 /scripts/rabbitmq-server-ha.ocf
parent0d65ecaa6437094873e68d12e63907ae98c0f99f (diff)
parent3fa7e7b05c4a921f5baecb27bee57615b96acb3d (diff)
downloadrabbitmq-server-git-a4fb78fec4517570988b79c0c8b1cebc32c17a1c.tar.gz
Merge pull request #653 from dmitrymex/log-pid
[OCF HA] Log process id in RabbitMQ OCF script
Diffstat (limited to 'scripts/rabbitmq-server-ha.ocf')
-rwxr-xr-xscripts/rabbitmq-server-ha.ocf9
1 files changed, 5 insertions, 4 deletions
diff --git a/scripts/rabbitmq-server-ha.ocf b/scripts/rabbitmq-server-ha.ocf
index 16fba44290..2cfe16bae9 100755
--- a/scripts/rabbitmq-server-ha.ocf
+++ b/scripts/rabbitmq-server-ha.ocf
@@ -613,7 +613,7 @@ rmq_setup_env() {
fi
done
- export LL="${OCF_RESOURCE_INSTANCE}:"
+ export LL="${OCF_RESOURCE_INSTANCE}[$$]:"
update_cookie
}
@@ -1286,6 +1286,7 @@ start_rmq_server_app() {
get_status() {
local what="${1:-kernel}"
local rc=$OCF_NOT_RUNNING
+ local LH="${LL} get_status():"
local body
local beam_running
@@ -1296,11 +1297,11 @@ get_status() {
beam_running=$?
# report not running only if the which_applications() reported an error AND the beam is not running
if [ $rc -ne 0 -a $beam_running -ne 0 ] ; then
- ocf_log info "get_status() failed with code ${rc}. Command output: ${body}"
+ ocf_log info "${LH} failed with code ${rc}. Command output: ${body}"
return $OCF_NOT_RUNNING
# return a generic error, if there were errors and beam is found running
elif [ $rc -ne 0 ] ; then
- ocf_log info "get_status() found the beam process running but failed with code ${rc}. Command output: ${body}"
+ ocf_log info "${LH} found the beam process running but failed with code ${rc}. Command output: ${body}"
return $OCF_ERR_GENERIC
fi
@@ -1310,7 +1311,7 @@ get_status() {
echo "$body" | grep "\{${what}," 2>&1 > /dev/null && rc=$OCF_SUCCESS
if [ $rc -ne $OCF_SUCCESS ] ; then
- ocf_log info "get_status(): app ${what} was not found in command output: ${body}"
+ ocf_log info "${LH} app ${what} was not found in command output: ${body}"
fi
fi