]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
vstart.sh: fix mgr vs restful command startup race 16564/head
authorSage Weil <sage@redhat.com>
Tue, 25 Jul 2017 13:20:29 +0000 (09:20 -0400)
committerSage Weil <sage@redhat.com>
Tue, 25 Jul 2017 13:20:29 +0000 (09:20 -0400)
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 <sage@redhat.com>
src/vstart.sh

index 8fb64f9910e643e7f8337a5583afa144ea1e8773..88c35d5e96fd6f3250462261c4bd88aaa29d6025 100755 (executable)
@@ -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`