Skip to content

Commit

Permalink
run voms-proxy-init from the container
Browse files Browse the repository at this point in the history
  • Loading branch information
smuzaffar committed Nov 5, 2024
1 parent a27266f commit 8e2e14c
Showing 1 changed file with 5 additions and 16 deletions.
21 changes: 5 additions & 16 deletions docker_launcher.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,10 @@ fi
export DBS_URL=https://cmsweb.cern.ch:8443/dbs/prod/global/DBSReader
export GIT_CONFIG_NOSYSTEM=1
if [ "X$WORKSPACE" = "X" ] ; then export WORKSPACE=$(/bin/pwd) ; fi
if [ "${X509_USER_PROXY}" = "" ] ; then
x509_proxyfile=x509up_u`id -u`
export X509_USER_PROXY=$WORKSPACE/${x509_proxyfile}
#Make sure to delete /tmp/${x509_proxyfile} as dasgoclient prefer to read it instead of $X509_USER_PROXY
#See https://github.com/dmwm/dasgoclient/issues/37
if [ -e /tmp/${x509_proxyfile} ] ; then
mv /tmp/${x509_proxyfile} ${X509_USER_PROXY}
else
rm -f /tmp/${x509_proxyfile}
voms-proxy-init -voms cms || true
fi
fi
x509_proxyfile=x509up_u`id -u`
#Make sure to delete /tmp/${x509_proxyfile} as dasgoclient prefer to read it instead of $X509_USER_PROXY
#See https://github.com/dmwm/dasgoclient/issues/37
[ ! -e /tmp/${x509_proxyfile} ] || rm -f /tmp/${x509_proxyfile}
XPATH=""
py3or2_dir="$HOME/bin"
if [ ! -e ${py3or2_dir} ] ; then
Expand Down Expand Up @@ -100,10 +92,7 @@ if [ "X$DOCKER_IMG" != X -a "X$RUN_NATIVE" = "X" ]; then
if [ -d $HOME/bin ] ; then
CMD2RUN="${CMD2RUN}export PATH=\$HOME/bin:\$PATH; "
fi
if [ "$X509_USER_PROXY" = "" ] ; then
CMD2RUN="${CMD2RUN}voms-proxy-init -voms cms -rfc -valid 24:00 || true ; voms-proxy-info || true; "
fi
CMD2RUN="${CMD2RUN}echo \$HOME; cd $WORKSPACE; echo \$PATH; $@"
CMD2RUN="${CMD2RUN}export X509_USER_PROXY=${WORKSPACE}/${x509_proxyfile}; voms-proxy-init -voms cms -rfc -valid 24:00 || true ; voms-proxy-info || true; echo \$HOME; cd $WORKSPACE; echo \$PATH; $@"
if $HAS_DOCKER ; then
docker pull $DOCKER_IMG
set +x
Expand Down

0 comments on commit 8e2e14c

Please sign in to comment.