From: Sage Weil Date: Tue, 25 Jul 2017 13:20:29 +0000 (-0400) Subject: vstart.sh: fix mgr vs restful command startup race X-Git-Tag: v12.1.2~129^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F16564%2Fhead;p=ceph.git vstart.sh: fix mgr vs restful command startup race If the mgr hasn't activated yet we won't have registered the python commands. Use 'ceph tell mgr ...' to ensure we block. (This is only a problem right after mkfs when the first mgr hasn't started yet.) Signed-off-by: Sage Weil --- diff --git a/src/vstart.sh b/src/vstart.sh index 8fb64f9910e6..88c35d5e96fd 100755 --- a/src/vstart.sh +++ b/src/vstart.sh @@ -671,7 +671,9 @@ EOF run 'mgr' $CEPH_BIN/ceph-mgr -i $name $ARGS done - if ceph_adm restful create-self-signed-cert; then + # use tell mgr here because the first mgr might not have activated yet + # to register the python module commands. + if ceph_adm tell mgr restful create-self-signed-cert; then SF=`mktemp` ceph_adm restful create-key admin -o $SF RESTFUL_SECRET=`cat $SF`