From 0495efe624f75fbf43b464a7b06d792c174a7964 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 25 Jul 2017 09:20:29 -0400 Subject: [PATCH] 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 --- src/vstart.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/vstart.sh b/src/vstart.sh index 8fb64f9910e..88c35d5e96f 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`