]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
init-ceph: if we fail to set an OSD's crush position, continue 1846/head
authorSage Weil <sage@inktank.com>
Tue, 20 May 2014 23:29:23 +0000 (16:29 -0700)
committerSage Weil <sage@inktank.com>
Tue, 20 May 2014 23:29:23 +0000 (16:29 -0700)
If we fail to set the CRUSH position for one OSD, continue on to try
starting others, just as we do when we fail to start the daemon.

Fixes: #8342
Signed-off-by: Sage Weil <sage@inktank.com>
src/init-ceph.in

index cf863c651ae0eef9c8c2373536badcbb2e2b0ea2..666af0334a5173d4d578ec86bbca3762c732ac75 100644 (file)
@@ -327,7 +327,11 @@ for name in $what; do
                    get_conf osd_weight "" "osd crush initial weight"
                    defaultweight="$(df -P -k $osd_data/. | tail -1 | awk '{ print sprintf("%.2f",$2/1073741824) }')"
                    get_conf osd_keyring "$osd_data/keyring" "keyring"
-                   do_cmd "timeout 30 $BINDIR/ceph -c $conf --name=osd.$id --keyring=$osd_keyring osd crush create-or-move -- $id ${osd_weight:-${defaultweight:-1}} $osd_location"
+                   do_cmd_okfail "timeout 30 $BINDIR/ceph -c $conf --name=osd.$id --keyring=$osd_keyring osd crush create-or-move -- $id ${osd_weight:-${defaultweight:-1}} $osd_location"
+                   if [ "$ERR" != "0" ]; then
+                       EXIT_STATUS=$ERR
+                       continue
+                   fi
                fi
            fi