From dc120501f429cf10d38081d02e0ffb0186cfe4c2 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 1 Feb 2018 09:26:31 -0600 Subject: [PATCH] vstart.sh: fix osd bootstrap Install the key before trying to use it for mkfs. Among other things this means the osd can fetch it's config from the mon before doing the mkfs step. Signed-off-by: Sage Weil --- src/vstart.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/vstart.sh b/src/vstart.sh index 14a843061ef04..cfd137df80f94 100755 --- a/src/vstart.sh +++ b/src/vstart.sh @@ -610,9 +610,10 @@ EOF local uuid=`uuidgen` echo "add osd$osd $uuid" - ceph_adm osd create $uuid - ceph_adm osd crush add osd.$osd 1.0 host=$HOSTNAME root=default OSD_SECRET=$($CEPH_BIN/ceph-authtool --gen-print-key) + echo "{\"cephx_secret\": \"$OSD_SECRET\"}" > dev/osd$osd/new.json + ceph_adm osd new $uuid -i dev/osd$osd/new.json + rm dev/osd$osd/new.json $SUDO $CEPH_BIN/ceph-osd -i $osd $ARGS --mkfs --key $OSD_SECRET --osd-uuid $uuid local key_fn=$CEPH_DEV_DIR/osd$osd/keyring -- 2.39.5