Commit e465acff authored by Edita Kizinevic's avatar Edita Kizinevic
Browse files

Update CE-cms-squid script

parent 8bbce896
......@@ -2,7 +2,7 @@
shopt -s expand_aliases
SCRIPT_REVISION="2019-09-17, Dave Dykstra and Edita Kizinevic"
SCRIPT_REVISION="2019-09-18, Dave Dykstra and Edita Kizinevic"
# Source the CMS environment
if [ -n "$OSG_GRID" ] ; then
......@@ -90,9 +90,10 @@ failover=false
if [ ! -z "$site" ] ; then
site_summary_file=site_summary.txt
url=http://wlcg-squid-monitor.cern.ch/failover/failoverCMS/$site_summary_file
wget -q $url
wget -q -O $site_summary_file $url
if [ -f "$site_summary_file" ] ; then
if grep -q $site $site_summary_file ; then
result="`grep -P "$site[, \t]" $site_summary_file`"
if [ ! -z "$result" ] ; then
failover=true
fi
else
......@@ -180,18 +181,22 @@ check_proxies "$FNCONNECT"
#Check test results
if [ "$failover" == true ]; then
message="many database queries from your site have connected directly to the Frontier Server Groups, with a high rate of queries not going through your local squid(s)."
message="many database queries from the site have connected directly to the Frontier servers or backup proxies, with a high rate of queries not going through the local squid(s):"
if [ "$ever_failed" == false ] && [ "$ever_succeeded" == true ]; then
echo "Proxy test is OK, however $message"
echo $result
exit $SAME_WARNING
elif [ "$ever_failed" == true ] && [ "$ever_succeeded" == true ]; then
echo "At least one of proxies is FAILED and $message"
echo $result
exit $SAME_WARNING
elif [ "$found_proxy" == false ]; then
echo "No proxies are found and $message"
echo $result
exit $SAME_WARNING
else
echo "Proxy test is FAILED and $message"
echo $result
exit $SAME_ERROR
fi
else
......
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