Created
February 15, 2019 22:19
-
-
Save nerdmagic/2f4eaf2ca03f10450e0ea8cace7deae2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for item in user bucket; do | |
for cluster in sv5 sv3 dc11; do | |
count="count_${cluster}" | |
plug=$count | |
eval $plug=$(ssh ${cluster}-ceph-rgw1 "sudo radosgw-admin $item list | jq length" 2> /dev/null ) | |
if [[ "$cluster" != "sv5" ]]; then | |
if (( count_sv5 == ${!plug} )); then | |
echo "sv5 and $cluster both have $count_sv5 ${item}s" | |
else | |
echo "ERROR: different $item counts: sv5 $count_sv5, $cluster ${!plug}" | |
fi | |
fi | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment