Commit b45f6d88 authored by Brian Paul Bockelman's avatar Brian Paul Bockelman
Browse files

Improve debugging output for payload proxy.

parent 0504d066
......@@ -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
......
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