From: Sage Weil Date: Tue, 20 May 2014 23:29:23 +0000 (-0700) Subject: init-ceph: if we fail to set an OSD's crush position, continue X-Git-Tag: v0.82~51^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F1846%2Fhead;p=ceph.git init-ceph: if we fail to set an OSD's crush position, continue 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 --- diff --git a/src/init-ceph.in b/src/init-ceph.in index cf863c651ae..666af0334a5 100644 --- a/src/init-ceph.in +++ b/src/init-ceph.in @@ -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