diff options
| author | Michael Klishin <michael@novemberain.com> | 2016-01-07 12:45:28 -0800 |
|---|---|---|
| committer | Michael Klishin <michael@novemberain.com> | 2016-01-07 12:45:28 -0800 |
| commit | 03fd0c2d35e82ed02c9fe615502e6b78c6ee9a1b (patch) | |
| tree | 50a54df157f658ca6dab86698be16f714fed1b05 /scripts | |
| parent | 0c4d9a0d88e15394889e69a426cf3a8fce149257 (diff) | |
| parent | 0f77ae3f47fabeebdb75644e61b183daddfc3917 (diff) | |
| download | rabbitmq-server-git-03fd0c2d35e82ed02c9fe615502e6b78c6ee9a1b.tar.gz | |
Merge pull request #532 from bogdando/bug/1529897
Remove unneeded sleep for a graceful stop by PID
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/rabbitmq-server-ha.ocf | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/scripts/rabbitmq-server-ha.ocf b/scripts/rabbitmq-server-ha.ocf index 5f338211d6..6cec4f1864 100755 --- a/scripts/rabbitmq-server-ha.ocf +++ b/scripts/rabbitmq-server-ha.ocf @@ -933,16 +933,12 @@ stop_server_process() { # Try to stop gracefully by known PID ocf_log info "${LH} Execute stop with timeout: ${TIMEOUT_ARG}" su_rabbit_cmd "${OCF_RESKEY_ctl} stop ${OCF_RESKEY_pid_file} 2>&1 >> \"${OCF_RESKEY_log_dir}/shutdown_log\"" - if [ $? -eq 0 ] ; then - ocf_log info "${LH} RMQ-server process (PID=${pid}) stopped succesfully." - ocf_log info "${LH} grant a graceful termintation window ${OCF_RESKEY_stop_time} to end its beam and remove pidfile" - sleep "${OCF_RESKEY_stop_time}" - fi + [ $? -eq 0 ] && ocf_log info "${LH} RMQ-server process (PID=${pid}) stopped succesfully." fi if [ -f ${OCF_RESKEY_pid_file} ] ; then # Ensure there is no beam process and pidfile left - ocf_log warn "${LH} Cannot be stopped, forcing the RMQ-server process termination" + ocf_log warn "${LH} The pidfile still exists, forcing the RMQ-server cleanup" kill_rmq_and_remove_pid fi |
