]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
upstart: OSD journal can be a symlink; if it's dangling, don't start.
authorTommi Virtanen <tv@inktank.com>
Fri, 5 Oct 2012 16:22:34 +0000 (09:22 -0700)
committerTommi Virtanen <tv@inktank.com>
Fri, 5 Oct 2012 22:41:35 +0000 (15:41 -0700)
This lets a $osd_data/journal symlink point to
/dev/disk/by-partuuid/UUID and the osd will not attempt to start until
that disk is available.

Signed-off-by: Tommi Virtanen <tv@inktank.com>
src/upstart/ceph-osd.conf

index 6c7612182ea9d62612157050ac05d88c501c2fa9..354dfa105feaf5adbf3a51b8f1303ae667278172 100644 (file)
@@ -29,6 +29,13 @@ pre-start script
        host="$(hostname -s)" \
        $location \
        || :
+
+    journal="/var/lib/ceph/osd/${cluster:-ceph}-$id/journal"
+    if [ -L "$journal" -a ! -e "$journal" ]; then
+       echo "ceph-osd($UPSTART_INSTANCE): journal not present, not starting yet." 1>&2
+       stop
+       exit 0
+    fi
 end script
 
 instance ${cluster:-ceph}/$id