[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[HTCondor-users] Updating Job ClassAd during job run



Hello,

We are trying to run a script as part of our HTCondor job wrapper where
the output of the job is used to update the classad of the job which
ran the script.

Currently we have a setup where the script runs in the job wrapper and
writes to a file where it is picked up by a stard_cron job that updates
the machine classad and the job classad using the instructions found on
the htcondor wiki: 
https://htcondor-wiki.cs.wisc.edu/index.cgi/wiki?p=HowToInsertClassAdIntoMachineAds
 and 
https://htcondor-wiki.cs.wisc.edu/index.cgi/wiki?p=HowToInsertCustomClassAdIntoJobs
 

Currently when the script is run the value is not put into the classad
of the job and the value set on the machine was used, until we set the
configuration value CLAIM_WORKLIFE=0 which causes the classad of the
job to have the value from the job that ran before it as if the job
classad is set at the job start and cannot be changed while the job is
running but other job classad attributes such as the walltime are
updated at the end of the job running. Is there another way for our
script to be run or a config value we are missing that can update the
job classad during the job or in a similar way to the walltime?

Let me know if this doesn't make sense or you need further
clarification. I've tried to put the parts of all the relevant files at
the end of the message.

Thanks for the help,

Matthew


Relevant config file exerpts:

condor_config.local:
...
STARTD_CRON_JOBLIST = test
STARTD_CRON_TEST_EXECUTABLE = /usr/local/sbin/update.sh
STARTD_CRON_TEST_MODE = Periodic
STARTD_CRON_TEST_PERIOD = 10s
STARTD_CRON_TEST_RECONFIG = False
CLAIM_WORKLIFE=0
...
-------------------------
jobwrapper.sh:
...
/usr/local/sbin/get_bmk_val.sh
exec "$@"
-------------------------
get_bmk_val.sh:

run_bmk >> /opt/bmkval
------------------------
update.sh:

newval=$(tail -n1 /opt/bmkval)

if [ value different than last time ]
then
  echo "VAL=$newval"
  echo "- update:true"
fi
------------------------