Skip to content

Instantly share code, notes, and snippets.

@nerdmagic
Created February 15, 2019 22:19
Show Gist options
  • Save nerdmagic/2f4eaf2ca03f10450e0ea8cace7deae2 to your computer and use it in GitHub Desktop.
Save nerdmagic/2f4eaf2ca03f10450e0ea8cace7deae2 to your computer and use it in GitHub Desktop.
#!/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