]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
upstart: try udevadm settle if osd journal isn't present
authorSage Weil <sage@inktank.com>
Tue, 26 Mar 2013 23:04:54 +0000 (16:04 -0700)
committerSage Weil <sage@inktank.com>
Wed, 27 Mar 2013 23:30:48 +0000 (16:30 -0700)
Wait briefly for the journal to appear if it isn't there yet, then give up.

Signed-off-by: Sage Weil <sage@inktank.com>
src/upstart/ceph-osd.conf

index 7bf8d704e2658effeb4fcbcfb4c382bdb97fac66..e26bbc790b9ca281ff7bf651aaf579b21896fd46 100644 (file)
@@ -38,9 +38,12 @@ pre-start script
 
     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
+        udevadm settle --timeout=5 || :
+       if [ -L "$journal" -a ! -e "$journal" ]; then
+            echo "ceph-osd($UPSTART_INSTANCE): journal not present, not starting yet." 1>&2
+           stop
+           exit 0
+       fi
     fi
 end script