2021-07-26 11:49:15 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
err=0
|
|
|
|
|
|
|
|
agents=$(pcs resource list ocf:heartbeat 2>&1)
|
|
|
|
if [ $(echo "$agents" | wc -l) -lt 2 ]; then
|
|
|
|
echo "ERROR: pcs: agents available:\n$agents"
|
|
|
|
err=$((err+1))
|
|
|
|
else
|
|
|
|
echo "INFO: pcs: agents available..."
|
|
|
|
fi
|
|
|
|
|
2021-07-28 08:36:15 +00:00
|
|
|
# skip until these are added
|
|
|
|
#for bin in aliyuncli-ra "gcloud-ra -v"; do
|
|
|
|
# output="$($bin 2>&1)"
|
|
|
|
# if [ $? -ne 0 ]; then
|
|
|
|
# echo -e "ERROR: $bin failed:\n$output"
|
|
|
|
# err=$((err+1))
|
|
|
|
# else
|
|
|
|
# echo "INFO: $bin works..."
|
|
|
|
# fi
|
|
|
|
#done
|
2021-07-26 11:49:15 +00:00
|
|
|
|
|
|
|
if [ $err -ge 1 ]; then
|
|
|
|
echo -e "\nERROR: $err tests FAILED..."
|
|
|
|
exit 1
|
|
|
|
fi
|