Opened 2 years ago

Closed 2 years ago

#1389 closed defect (fixed)

TMPDIR is re-defined twice when starting jobs

Reported by: Nicklas Nordborg Owned by: Nicklas Nordborg
Priority: critical Milestone: Job scheduler extension v1.6
Component: net.sf.basedb.opengrid Keywords:
Cc:

Description

I found a problem when a cluster was configured with default value for temporary directory: $TMPDIR. This variable is automatically assigned a value by the Open Grid Engine that is unique for a job, but in our scripts we also append the job name to it: TMPDIR=${TMPDIR}/<name-of-job>. The problem is that this happens twice now that we have split up the script files into multiple pieces. Basically we have:

## In submit.sh
TMPDIR=$TMPDIR/RnaDemux-220427-0807-0006-158b86
mkdir -p $TMPDIR

## In job.sh
TMPDIR=$TMPDIR/RnaDemux-220427-0807-0006-158b86

## In xxxx.sh
if [ ! -d "$TMPDIR" ]; then
   ## Directory doesn't exits!
   exit 1
fi

This causes the job name to be appended twice but we never create that directory which causes jobs to fail with: Directory 'TMPDIR-->/tmp/593504.1.all.q/RnaDemux-220427-0807-0006-158b86/RnaDemux-220427-0807-0006-158b86' doesn't exists

Change History (1)

comment:1 by Nicklas Nordborg, 2 years ago

Owner: set to Nicklas Nordborg
Resolution: fixed
Status: newclosed

In 6705:

Fixes #1389: TMPDIR is re-defined twice when starting jobs

No environment variables should be defined (or re-defined) in job.sh.

Note: See TracTickets for help on using tickets.