]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
vstart.sh: avoid race condition starting rgw via vstart.sh 7727/head
authorJavier M. Mellid <jmunhoz@igalia.com>
Sat, 20 Feb 2016 17:33:21 +0000 (17:33 +0000)
committerJavier M. Mellid <jmunhoz@igalia.com>
Sat, 20 Feb 2016 17:33:21 +0000 (17:33 +0000)
In slow environments running vstart.sh hits a race condition setting up
the rgw server. Creating the S3 and Swift users before booting rgw
avoids the issue.

Fixes: #14829
Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
src/vstart.sh

index 03032ada7351ebb0e2c0981503f481821988a141..a4df32225b1627575d7d93b05311e6d88e9b7cb3 100755 (executable)
@@ -727,17 +727,6 @@ do_hitsets $hitset
 
 do_rgw()
 {
-    # Start server
-    echo start rgw on http://localhost:$CEPH_RGW_PORT
-    RGWDEBUG=""
-    if [ "$debug" -ne 0 ]; then
-        RGWDEBUG="--debug-rgw=20"
-    fi
-
-    RGWSUDO=
-    [ $CEPH_RGW_PORT -lt 1024 ] && RGWSUDO=sudo
-    $RGWSUDO $CEPH_BIN/radosgw -c $conf_fn --log-file=${CEPH_OUT_DIR}/rgw.log ${RGWDEBUG} --debug-ms=1
-
     # Create S3 user
     local akey='0555b35654ad1656d804'
     local skey='h7GhxuBLTrlhVUyxSPUKUV8r/2EI4ngqJxD7iBdBYLhwluN30JaT3Q=='
@@ -774,6 +763,17 @@ do_rgw()
     echo "  user      : tester"
     echo "  password  : testing"
     echo ""
+
+    # Start server
+    echo start rgw on http://localhost:$CEPH_RGW_PORT
+    RGWDEBUG=""
+    if [ "$debug" -ne 0 ]; then
+        RGWDEBUG="--debug-rgw=20"
+    fi
+
+    RGWSUDO=
+    [ $CEPH_RGW_PORT -lt 1024 ] && RGWSUDO=sudo
+    $RGWSUDO $CEPH_BIN/radosgw -c $conf_fn --log-file=${CEPH_OUT_DIR}/rgw.log ${RGWDEBUG} --debug-ms=1
 }
 if [ "$start_rgw" -eq 1 ]; then
     do_rgw