Commit 0d5e1d51 authored by Andrea Sciaba's avatar Andrea Sciaba
Browse files

Merge branch 'ekizinev-qa-patch-34176' into 'qa'

Give a warn if some addresses fail but other work

See merge request !9
parents 4513fdc2 b43b7ddc
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
shopt -s expand_aliases 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 # Source the CMS environment
if [ -n "$OSG_GRID" ] ; then if [ -n "$OSG_GRID" ] ; then
...@@ -127,6 +127,7 @@ check_proxies() { ...@@ -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 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 if grep -q " 1 NUMBER" $output ; then
echo "$proxy_IP is OK" echo "$proxy_IP is OK"
ever_succeeded=true
else else
echo "$proxy_IP is FAILED:" echo "$proxy_IP is FAILED:"
cat $output cat $output
...@@ -157,13 +158,17 @@ echo ...@@ -157,13 +158,17 @@ echo
# Check proxies # Check proxies
output="output.txt" output="output.txt"
ever_failed=false ever_failed=false
ever_succeeded=false
check_proxies "$FNCONNECT" check_proxies "$FNCONNECT"
#Check test results #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." echo "Proxy test is FAILED."
exit $SAME_ERROR exit $SAME_ERROR
else
echo "Proxy test is OK"
exit $SAME_OK
fi 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