]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/multisite/test: allow passing rgw parameter to multisite script 44416/head
authorYuval Lifshitz <ylifshit@redhat.com>
Mon, 27 Dec 2021 15:19:53 +0000 (17:19 +0200)
committerYuval Lifshitz <ylifshit@redhat.com>
Mon, 27 Dec 2021 15:19:53 +0000 (17:19 +0200)
this allow changing rgw conf when sratting the test scrip. e.g.
MON=1 OSD=1 MDS=0 MGR=1 ../src/test/rgw/test-rgw-multisite.sh 2
--rgw_max_objs_per_shard=50

Signed-off-by: Yuval Lifshitz <ylifshit@redhat.com>
src/test/rgw/test-rgw-common.sh
src/test/rgw/test-rgw-multisite.sh

index f65bbf20f4655eb0b003461bdc9ff92e5f3d2667..d88148544f9a132fc9419ac9cda35b86510377eb 100644 (file)
@@ -76,9 +76,13 @@ function rgw_admin {
 }
 
 function rgw {
-  [ $# -ne 2 ] && echo "rgw() needs 2 params" && exit 1
+  [ $# -lt 2 ] && echo "rgw() needs at least 2 params" && exit 1
 
-  echo "$mrgw $1 $2 $rgw_flags"
+  name=$1
+  port=$2
+  shift 2
+
+  echo "$mrgw $name $port $rgw_flags $@"
 }
 
 function init_first_zone {
index 94beef95508fe100ad3edc30ed913398305b4af6..6e7b582aae39195ade58e455e2eeb0f706131466 100755 (executable)
@@ -1,8 +1,9 @@
 #!/usr/bin/env bash
 
-[ $# -lt 1 ] && echo "usage: $0 <num-clusters>" && exit 1
+[ $# -lt 1 ] && echo "usage: $0 <num-clusters> [rgw parameters...]" && exit 1
 
 num_clusters=$1
+shift
 
 [ $num_clusters -lt 1 ] && echo "clusters num must be at least 1" && exit 1
 
@@ -22,7 +23,7 @@ x $(start_ceph_cluster c1) -n
 
 # create realm, zonegroup, zone, start rgw
 init_first_zone c1 $realm_name $zg ${zg}-1 8001 $system_access_key $system_secret
-x $(rgw c1 8001)
+x $(rgw c1 8001 "$@")
 
 output=`$(rgw_admin c1) realm get`
 
@@ -36,7 +37,7 @@ while [ $i -le $num_clusters ]; do
 
   # create new zone, start rgw
   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)))
+  x $(rgw c$i $((8000+$i)) "$@")
 
   i=$((i+1))
 done