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

Re: [Condor-users] Startd injecting environment variables for starting jobs?



Hi Matt

On Thursday 09 December 2010 21:01:19 Matthew Farrellee wrote:
> STARTD_JOB_EXPRS takes attributes from the job and advertises them on
> the slot where the job is running. Sounds like the opposite direction.
> 

Not really, the execute node knows what it can support, thus needs to 
advertise this to the user, thus STARTD_ATTRS seemed like the correct place 
(and is, see below)

> Any particular reason you're not talking about getenv/environment
> associated with the job?
> 
getenv imports the environment of the user when submitting the job, correct? 
Thus, how should the submit machine know.
> You could try a script that reads the $_CONDOR_MACHINE_AD (it's there,
> right?) grabs the Env attribute and does some concatenation.
> 
> Let me know how it goes. I've been meaning to try this out myself.

Greg Thain had a much, much simpler solution (thank you very much for that!)

$$(VARIABLE) in the submit file will pick up the STARTD_ATTRS I already set. 
Works beautifully.

Caveat: you need to set this variable everywhere or make sure by using proper 
requirements, to steer only to machines which supports this (but then there 
seems to be another problem, see my next email), otherwise your jobs will go 
into hold state.

Cheers

Carsten