Commit b43b7ddc authored by Edita Kizinevic's avatar Edita Kizinevic Committed by Andrea Sciaba
Browse files

Give a warn if some addresses fail but other work

parent 4513fdc2
......@@ -2,7 +2,7 @@
shopt -s expand_aliases
SCRIPT_REVISION="2019-04-15, Dave Dykstra and Edita Kizinevic"
SCRIPT_REVISION="2019-04-16, Dave Dykstra and Edita Kizinevic"
# Source the CMS environment
if [ -n "$OSG_GRID" ] ; then
......@@ -127,6 +127,7 @@ check_proxies() {
echo 'select 1 from dual' | FRONTIER_SERVER="$proxy_IP(serverurl=http://cmsfrontier.cern.ch:8000/FrontierProd)(failovertoserver=no)" fn-req > $output
if grep -q " 1 NUMBER" $output ; then
echo "$proxy_IP is OK"
ever_succeeded=true
else
echo "$proxy_IP is FAILED:"
cat $output
......@@ -157,13 +158,17 @@ echo
# Check proxies
output="output.txt"
ever_failed=false
ever_succeeded=false
check_proxies "$FNCONNECT"
#Check test results
if $ever_failed ; then
if [ "$ever_failed" == false ] && [ "$ever_succeeded" == true ]; then
echo "Proxy test is OK."
exit $SAME_OK
elif [ "$ever_failed" == true ] && [ "$ever_succeeded" == true ]; then
echo "At least one of proxies is FAILED."
exit $SAME_WARNING
else
echo "Proxy test is FAILED."
exit $SAME_ERROR
else
echo "Proxy test is OK"
exit $SAME_OK
fi
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment