From d04b386bdfa29707065930478a01e4fa7196d334 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 20 May 2014 16:29:23 -0700 Subject: [PATCH] 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 --- src/init-ceph.in | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/init-ceph.in b/src/init-ceph.in index cf863c651ae0e..666af0334a517 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 -- 2.39.5