]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
test/rgw: update and fixes for test-rgw-multisite.sh
authorCasey Bodley <cbodley@redhat.com>
Thu, 6 Apr 2017 23:10:33 +0000 (19:10 -0400)
committerCasey Bodley <cbodley@redhat.com>
Tue, 18 Apr 2017 18:49:18 +0000 (14:49 -0400)
the script was incomplete and unused, but it seems useful in itself
to bring up a simple multisite cluster without having to go through
test_multi.py. it's also a good test for functions in the other
test-rgw-*.sh scripts

Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/test/rgw/test-rgw-multisite.sh

index 6daf7dd31cf4cd9355a68bb5bfcc5efa596b3248..4362cda9fe7c86fd7f01dc8e3ab40f1a84c9c867 100755 (executable)
@@ -14,23 +14,17 @@ set -e
 realm_name=earth
 zg=zg1
 
-i=1
-while [ $i -le $num_clusters ]; do
-  eval zone$i=${zg}-$i
-  eval zone${i}_port=$((8000+$i))
-  i=$((i+1))
-done
-
 system_access_key="1234567890"
 system_secret="pencil"
 
 # bring up first cluster
-x $(start_ceph_cluster 1) -n
+x $(start_ceph_cluster c1) -n
 
 # create realm, zonegroup, zone, start rgw
-init_first_zone 1 $realm_name $zg $zone1 $zone1_port $system_access_key $system_secret
+init_first_zone c1 $realm_name $zg ${zg}-1 8001 $system_access_key $system_secret
+x $(rgw c1 8001)
 
-output=`$(rgw_admin 1) realm get`
+output=`$(rgw_admin c1) realm get`
 
 echo realm_status=$output
 
@@ -38,18 +32,19 @@ echo realm_status=$output
 
 i=2
 while [ $i -le $num_clusters ]; do
-  x $(start_ceph_cluster 1 $i) -n
-
+  x $(start_ceph_cluster c$i) -n
 
   # create new zone, start rgw
-  zone_port=eval echo '$'zone${i}_port
-  init_zone_in_existing_zg $i $realm_name $zg $zone1 $zone1_port $zone_port $system_access_key $system_secret
+  init_zone_in_existing_zg c$i $realm_name $zg ${zg}-${i} 8001 $((8000+$i)) $zone_port $system_access_key $system_secret
+  x $(rgw c$i $((8000+$i)))
 
   i=$((i+1))
 done
 
 i=2
 while [ $i -le $num_clusters ]; do
-  wait_for_meta_sync 1 $i $realm_name
+  wait_for_meta_sync c1 c$i $realm_name
+
+  i=$((i+1))
 done