[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [HTCondor-users] enforce classad values in submit file
- Date: Mon, 21 Mar 2016 19:45:10 +0100
- From: Thomas Hartmann <thomas.hartmann@xxxxxxxx>
- Subject: Re: [HTCondor-users] enforce classad values in submit file
wow! thanks a lot. i will definitely try this out!
and i would like to say a general thanks to the whole list. the support
of htcondor is nothing short of awesome!
Am 2016-03-21 um 17:05 schrieb Todd Tannenbaum:
On 3/18/2016 12:15 PM, Thomas Hartmann wrote:
hi, is there any way to enforce certain classads expressions in a
to be more specific, i want this classad to be used for every job and
i want to prevent users from changing it:
request_memory = ifThenElse(MemoryUsage =!= UNDEFINED, ( MemoryUsage
) * 3 / 2, 1024)
another possibility might be using SUBMIT_REQUIREMENT_.... so a job
with a request_memory different from what is specified would be
rejected. but the problem would be here, that the expression would be
evaluated first, so i could not check for the ifthenelse expression,
This is an area we are planning to improve soon in the v8.5 series to make it easier for the admin. But for right now in currently released versions of HTCondor, I think you can indeed check for the ifthenelse expression via SUBMIT_REQUIREMENT by using the unparse() ClassAd built-in function in your SUBMIT_REQUIREMENTS expression. See the docs for ClassAd functions at http://is.gd/AmcY3X
So I am thinking today you could append something like the following in your condor_config :
JOB_DEFAULT_REQUESTMEMORY = ifthenelse(x,y,z)
SUBMIT_REQUIREMENT_NAMES = $(SUBMIT_REQUIREMENT_NAMES) MEMORY
SUBMIT_REQUIREMENT_MEMORY = unparse(RequestMemory) =?= "ifthenelse(x,y,z)"
SUBMIT_REQUIREMENT_MEMORY_REASON = "You are not allowed to set request_memory"
PROTECTED_JOB_ATTRS = $(PROTECTED_JOB_ATTRS) RequestMemory MemoryUsage
Before setting up the above, you will probably want to do a condor_q -l on a job that has your desired RequestMemory attribute so you can get the whitespacing correct to compare against unparse(). Note that the PROTECTED_JOB_ATTRS setting, which appeared in v8.5.2, will prevent a determined user from changing these attributes after submission with condor_qedit or chirp.
While I think the above will let you do what you want today, I admit it is kinda clunky, which is why we will be improving it soon so the admin will be easily able to tell the schedd things like "override the value of this attribute upon submission".
Hope this helps
HTCondor-users mailing list
To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
You can also unsubscribe by visiting
The archives can be found at:
Dr. Thomas Hartmann
Centre for Cognitive Neuroscience
Tel: +43 662 8044 5109
"I am a brain, Watson. The rest of me is a mere appendix. " (Arthur Conan Doyle)