]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Remove mon socket in post-stop 322/head
authorGuilhem Lettron <guilhem+github@lettron.fr>
Mon, 27 May 2013 10:41:53 +0000 (12:41 +0200)
committerGuilhem Lettron <guilhem@lettron.fr>
Tue, 28 May 2013 08:35:24 +0000 (10:35 +0200)
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>
src/upstart/ceph-mon.conf

index 17fd11b6a24dac6e6a77b57d811cf6d238bb874e..0279f15c5a8bf8e528d4908075bec70500ce3947 100644 (file)
@@ -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