Skip to content

Commit

Permalink
ci: fix multisite test
Browse files Browse the repository at this point in the history
We just need to wait a little for the object to be replicated to the
other gateway. A simple retry solves this.

Closes: #8671
Signed-off-by: Sébastien Han <seb@redhat.com>
  • Loading branch information
leseb authored and subhamkrai committed Sep 28, 2021
1 parent 6f54ab0 commit a27e8f3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/scripts/github-action-helper.sh
Expand Up @@ -253,7 +253,12 @@ function write_object_to_cluster1_read_from_cluster2() {
s3cmd -v -d --config=s3cfg --access_key=${ACCESS_KEY} --secret_key=${SECRET_KEY} --host=${CLUSTER_1_IP_ADDR} mb s3://bkt
s3cmd -v -d --config=s3cfg --access_key=${ACCESS_KEY} --secret_key=${SECRET_KEY} --host=${CLUSTER_1_IP_ADDR} put ./1M.dat s3://bkt
CLUSTER_2_IP_ADDR=$(kubectl -n rook-ceph-secondary get svc rook-ceph-rgw-zone-b-multisite-store -o jsonpath="{.spec.clusterIP}")
s3cmd -v -d --config=s3cfg --access_key=${ACCESS_KEY} --secret_key=${SECRET_KEY} --host=${CLUSTER_2_IP_ADDR} get s3://bkt/1M.dat 1M-get.dat --force
timeout 60 bash <<EOF
until s3cmd -v -d --config=s3cfg --access_key=${ACCESS_KEY} --secret_key=${SECRET_KEY} --host=${CLUSTER_2_IP_ADDR} get s3://bkt/1M.dat 1M-get.dat --force; do
echo "waiting for object to be replicated"
sleep 5
done
EOF
diff 1M.dat 1M-get.dat
}

Expand Down

0 comments on commit a27e8f3

Please sign in to comment.