I would like to validate by hook “aoe” parameter when user is trying to submitt a job to pbs queue. To do this I need to read this parameter from queued job.
For example user executed command:
qsub -I -l select=2:ncpus=272:aoe=centos-7.3 -l walltime=01:00:00
So I think that the way to read this “centos-7.3” value I need to use following code into hook script:
aoe = pbs.event().job.Resource_List[“aoe”]
but, as I can see always “None” value is returned.
Someone can help me to find a way to read this parameter by hook?
Hook info:
"Qmgr: list hook ValidateAOEparameter"
Hook ValidateAOEparameter
type = site
enabled = true
event = queuejob
user = pbsadmin
alarm = 30
order = 1
debug = false
fail_action = none
Hello Witold. I am also working on a provisioning hook, so it would be
great to keep in touch.
this works for me in a hook:
e = pbs.event() # this is out PBS event object
vnode = e.vnode # this is the nodename as PBS sees it
aoe = e.aoe # this is the name if the image (or software) as PBS sees
it
I don’t think you read the aoe from the job’s resource list - it is a
property of the pbs event