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
b45f6d88
Commit
b45f6d88
authored
Sep 24, 2012
by
Brian Paul Bockelman
Browse files
Improve debugging output for payload proxy.
parent
0504d066
Changes
1
Hide whitespace changes
Inline
Side-by-side
nagios/org.cms.glexec/probes/org.cms.glexec/testjob/tests/glprobe.sh
View file @
b45f6d88
...
...
@@ -29,12 +29,13 @@ exitcode=$NAG_OK
# Print environment information
now
=
"
`
date
-u
+
'%F %T'
`
UTC"
now_local
=
"
`
date
`
"
currdir
=
$PWD
host
=
`
uname
-n
`
pilotid
=
`
/usr/bin/id
`
pilotidu
=
`
/usr/bin/id
-u
`
pilotidg
=
`
id
-G
|
tr
' '
'\n'
|
sort
-n
|
tr
'\n'
' '
`
add2buffer
"Ran at
$now
on host
$host
as user:"
add2buffer
"Ran at
$now
(
$now_local
)
on host
$host
as user:"
add2buffer
"
$pilotid
"
# Check that $X509_USER_PROXY points to an existing file
...
...
@@ -43,6 +44,9 @@ if [ -z "$X509_USER_PROXY" ]; then
exit
$NAG_CRITICAL
fi
add2buffer
""
add2buffer
"Pilot Information:"
if
[
-f
"
$X509_USER_PROXY
"
]
;
then
add2buffer
"X509_USER_PROXY=
$X509_USER_PROXY
"
else
...
...
@@ -50,11 +54,11 @@ else
exit
$NAG_CRITICAL
fi
# workaround to suppress voms errors on OSG
export
VOMS_PROXY_INFO_DONT_VERIFY_AC
=
"1"
# Setup the grid environment:
if
[
-n
"
$OSG_GRID
"
]
;
then
# workaround to suppress voms errors on OSG
export
VOMS_PROXY_INFO_DONT_VERIFY_AC
=
"1"
[
-f
$OSG_GRID
/setup.sh
]
&&
source
$OSG_GRID
/setup.sh
fi
...
...
@@ -63,6 +67,9 @@ fqan=`voms-proxy-info --fqan | head -1`
add2buffer
"DN:
$dn
"
add2buffer
"Primary FQAN:
$fqan
"
add2buffer
""
add2buffer
"Environment information:"
# Set the CMS environment
if
[
-n
"
$VO_CMS_SW_DIR
"
]
;
then
SW_DIR
=
$VO_CMS_SW_DIR
...
...
@@ -130,13 +137,17 @@ add2buffer "Site name: $siteName"
tier
=
`
grep
"site name"
$ConfigFile
|
grep
-v
"subsite name"
|
cut
-d
'"'
-f2
|
cut
-d
'_'
-f1
`
if
[
"x
$tier
"
==
"xT1"
]
;
then
mv
-f
$currdir
/payloadproxy-t1
$currdir
/payloadproxy
rm
-f
$currdir
/payloadproxy-t2
add2buffer
"Using t1access role for the payload"
if
[
-f
$currdir
/payloadproxy-t1
]
;
then
mv
-f
$currdir
/payloadproxy-t1
$currdir
/payloadproxy
[
-f
$currdir
/payloadproxy-t2
]
&&
rm
-f
$currdir
/payloadproxy-t2
add2buffer
"Using t1access role for the payload"
fi
else
mv
-f
$currdir
/payloadproxy-t2
$currdir
/payloadproxy
rm
-f
$currdir
/payloadproxy-t1
add2buffer
"Using standard cms proxy for the payload"
if
[
-f
$currdir
/payloadproxy-t2
]
;
then
mv
-f
$currdir
/payloadproxy-t2
$currdir
/payloadproxy
[
-f
$currdir
/payloadproxy-t1
]
&&
rm
-f
$currdir
/payloadproxy-t1
add2buffer
"Using standard cms proxy for the payload"
fi
fi
# Check that the payload proxy is available
...
...
@@ -149,6 +160,19 @@ else
exit
$NAG_CRITICAL
fi
add2buffer
""
add2buffer
"Payload information:"
dn
=
`
voms-proxy-info
--identity
`
fqan
=
`
voms-proxy-info
--fqan
|
head
-1
`
timeleft
=
`
voms-proxy-info
--timeleft
`
actimeleft
=
`
voms-proxy-info
--actimeleft
`
add2buffer
"Payload DN:
$dn
"
add2buffer
"Payload Primary FQAN:
$fqan
"
add2buffer
"There are
$timeleft
seconds until the payload proxy expires (
$actimeleft
until the VOMS extension expires)"
add2buffer
""
add2buffer
"Glexec Invocation:"
# finding the glexec environment
glexec
=
${
OSG_GLEXEC_LOCATION
:-${
GLEXEC_LOCATION
:-${
GLITE_LOCATION
:-
/usr
}}
/sbin/glexec
}
if
[
-f
"
$glexec
"
]
;
then
...
...
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