Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=d77a25c817c985... Commit: d77a25c817c985f3200b1676c659683e3984564c Parent: b5eb3050608dbf3dae895f9d5ef3bade5669ffb1 Author: Ryan McCabe rmccabe@redhat.com AuthorDate: Wed Apr 23 14:04:39 2014 -0400 Committer: Ryan McCabe rmccabe@redhat.com CommitterDate: Wed Apr 23 14:07:15 2014 -0400
rgmanager: Forcibly remove pid file if sending SIGQUIT
If a daemon is sent SIGQUIT after SIGTERM fails to stop it, forcibly remove the pid file after verifying the process no longer exists. This fixes a bug that causes future starts to fail if a new process happens to exist with the same pid when the resource is restarted.
Resolves: rhbz#1035034
Signed-off-by: Ryan McCabe rmccabe@redhat.com --- rgmanager/src/resources/utils/ra-skelet.sh | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/rgmanager/src/resources/utils/ra-skelet.sh b/rgmanager/src/resources/utils/ra-skelet.sh index f1c3d70..93a8ac3 100644 --- a/rgmanager/src/resources/utils/ra-skelet.sh +++ b/rgmanager/src/resources/utils/ra-skelet.sh @@ -132,7 +132,11 @@ stop_generic_sigkill() { clog_service_stop $CLOG_FAILED_KILL return $OCF_ERR_GENERIC fi - + + # If we had to send a SIGQUIT, the pid file may not have been + # cleaned up by the daemon. Make sure it's removed so that future + # resource starts do not fail. + rm -f -- "$pid_file" clog_service_stop $CLOG_SUCCEED_KILL return 0 }
cluster-commits@lists.fedorahosted.org