]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Remove mon socket in post-stop
authorGuilhem Lettron <guilhem+github@lettron.fr>
Mon, 27 May 2013 10:41:53 +0000 (12:41 +0200)
committerSage Weil <sage@inktank.com>
Fri, 14 Jun 2013 21:12:34 +0000 (14:12 -0700)
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)

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