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

RE: [Condor-users] How to get CONDOR environment variables from arunning task



> Hi,
> 
> I'd like to be able to change a property value from a script that is
> executed on a specific node. For this I must use the condor_config_val
> file. But right now I'm not able to obtain the path to this file
(which
> can be different from node to node). I tried to print the env command
> output but obtained just this
> 
>
_CONDOR_SCRATCH_DIR=/opt/condor-6.7.8/local.patrouille/execute/dir_12110
> PWD=/opt/condor-6.7.8/local.patrouille/execute/dir_12110
> SHLVL=1
> _=/bin/env
> 
> Is there a way to get, from the executing task the value of
$RELEASE_DIR ?

If you add it to the advertised startd attributes you may be able to
force it into the job's environment. I'm not 100% certain this will work
so try it out. Add the following to your machine's configuration file:

	STARTD_EXPRS = RELEASE_DIR

And now try and make this part of your job environment by adding the
following to the submit file:

	environment = CONDOR_RELEASE_DIR=$$(RELEASE_DIR)

That may or may not work. I use a similar approach to put the VM # into
an env var for my jobs. So I can say this definitely works:

	environment = CONDOR_VMID=$$(VIRTUALMACHINEID)

- Ian