Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
etf
cmssam
Commits
8bbce896
Commit
8bbce896
authored
Sep 17, 2019
by
Edita Kizinevic
Browse files
Check failover list
parent
fc26e7a2
Changes
1
Hide whitespace changes
Inline
Side-by-side
SiteTests/FroNtier/tests/CE-cms-squid
View file @
8bbce896
...
...
@@ -2,7 +2,7 @@
shopt
-s
expand_aliases
SCRIPT_REVISION
=
"2019-0
8-26
, Dave Dykstra and Edita Kizinevic"
SCRIPT_REVISION
=
"2019-0
9-17
, Dave Dykstra and Edita Kizinevic"
# Source the CMS environment
if
[
-n
"
$OSG_GRID
"
]
;
then
...
...
@@ -70,6 +70,14 @@ fi
echo
"script version:
$SCRIPT_REVISION
"
echo
# Get site name
site_local_config_file
=
${
CMS_PATH
}
/SITECONF/local/JobConfig/site-local-config.xml
if
[
!
-f
"
$site_local_config_file
"
]
;
then
echo
"ERROR: file
${
site_local_config_file
}
does not exist"
exit
$SAME_ERROR
fi
site
=
`
grep
-oP
'(?<=site name=").*(?=")'
$site_local_config_file
`
# Create Working Directory
mkdir
squid
cd
squid
...
...
@@ -77,6 +85,21 @@ current=`pwd`
echo
"Current directory is:
${
current
}
"
echo
# Get information from failover monitor
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
if
[
-f
"
$site_summary_file
"
]
;
then
if
grep
-q
$site
$site_summary_file
;
then
failover
=
true
fi
else
echo
"
$site_summary_file
file is not retrieved from
$url
"
fi
fi
# Set up CMSSW
echo
"Set up CMSSW ... starting"
CMSREL
=
"
`
scram l |
grep
-B
1
"cms.cern.ch"
|
grep
" CMSSW"
|
tail
-1
|
awk
'{print $2}'
`
"
...
...
@@ -156,16 +179,33 @@ found_proxy=false
check_proxies
"
$FNCONNECT
"
#Check test results
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
elif
[
"
$found_proxy
"
==
false
]
;
then
echo
"No proxies are found."
exit
$SAME_OK
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)."
if
[
"
$ever_failed
"
==
false
]
&&
[
"
$ever_succeeded
"
==
true
]
;
then
echo
"Proxy test is OK, however
$message
"
exit
$SAME_WARNING
elif
[
"
$ever_failed
"
==
true
]
&&
[
"
$ever_succeeded
"
==
true
]
;
then
echo
"At least one of proxies is FAILED and
$message
"
exit
$SAME_WARNING
elif
[
"
$found_proxy
"
==
false
]
;
then
echo
"No proxies are found and
$message
"
exit
$SAME_WARNING
else
echo
"Proxy test is FAILED and
$message
"
exit
$SAME_ERROR
fi
else
echo
"Proxy test is FAILED."
exit
$SAME_ERROR
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
elif
[
"
$found_proxy
"
==
false
]
;
then
echo
"No proxies are found."
exit
$SAME_OK
else
echo
"Proxy test is FAILED."
exit
$SAME_ERROR
fi
fi
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment