summaryrefslogtreecommitdiffstats
path: root/src/test/rgw/test-rgw-multisite.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:45:59 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:45:59 +0000
commit19fcec84d8d7d21e796c7624e521b60d28ee21ed (patch)
tree42d26aa27d1e3f7c0b8bd3fd14e7d7082f5008dc /src/test/rgw/test-rgw-multisite.sh
parentInitial commit. (diff)
downloadceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.tar.xz
ceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.zip
Adding upstream version 16.2.11+ds.upstream/16.2.11+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-xsrc/test/rgw/test-rgw-multisite.sh50
1 files changed, 50 insertions, 0 deletions
diff --git a/src/test/rgw/test-rgw-multisite.sh b/src/test/rgw/test-rgw-multisite.sh
new file mode 100755
index 000000000..94beef955
--- /dev/null
+++ b/src/test/rgw/test-rgw-multisite.sh
@@ -0,0 +1,50 @@
+#!/usr/bin/env bash
+
+[ $# -lt 1 ] && echo "usage: $0 <num-clusters>" && exit 1
+
+num_clusters=$1
+
+[ $num_clusters -lt 1 ] && echo "clusters num must be at least 1" && exit 1
+
+. "`dirname $0`/test-rgw-common.sh"
+. "`dirname $0`/test-rgw-meta-sync.sh"
+
+set -e
+
+realm_name=earth
+zg=zg1
+
+system_access_key="1234567890"
+system_secret="pencil"
+
+# bring up first cluster
+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)
+
+output=`$(rgw_admin c1) realm get`
+
+echo realm_status=$output
+
+# bring up next clusters
+
+i=2
+while [ $i -le $num_clusters ]; do
+ x $(start_ceph_cluster c$i) -n
+
+ # 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)))
+
+ i=$((i+1))
+done
+
+i=2
+while [ $i -le $num_clusters ]; do
+ wait_for_meta_sync c1 c$i $realm_name
+
+ i=$((i+1))
+done
+