summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuilhem Lettron <guilhem+github@lettron.fr>2013-05-27 12:41:53 +0200
committerSage Weil <sage@inktank.com>2013-06-14 14:12:34 -0700
commitcbca9232618e85bd15b8677c9306042caad876a6 (patch)
tree7fa23ae1db3b7539cee0577ac576fbe2d8a811c6
parent3f8b3cf1d4042ae6bb64a840ff19f859e6ce6dc2 (diff)
downloadceph-cbca9232618e85bd15b8677c9306042caad876a6.tar.gz
Remove mon socket in post-stop
If ceph-mon segfault, socket file isn't removed. By adding a remove in post-stop, upstart clean run directory properly. Signed-off-by: Guilhem Lettron <guilhem@lettron.fr> (cherry picked from commit 554b41b171eab997038e83928c462027246c24f4)
-rw-r--r--src/upstart/ceph-mon.conf5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/upstart/ceph-mon.conf b/src/upstart/ceph-mon.conf
index 17fd11b6a24..0279f15c5a8 100644
--- a/src/upstart/ceph-mon.conf
+++ b/src/upstart/ceph-mon.conf
@@ -24,3 +24,8 @@ export id
#usage "cluster = name of cluster (defaults to 'ceph'); id = monitor instance id"
exec /usr/bin/ceph-mon --cluster="${cluster:-ceph}" -i "$id" -f
+
+post-stop script
+ # Cleanup socket in case of segfault
+ rm -f "/var/run/ceph/ceph-mon.$id.asok"
+end script