]> 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:43:18 +0000 (15:43 -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 119ad000fc49be82bda3b5abb1a6319bc54b8073..0e22e6699deafd559f4212215b258db372031bfb 100644 (file)
@@ -28,6 +28,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