oar-team / oar

OAR is a versatile resource and task manager (also called a batch scheduler) for clusters and other computing infrastructures.
http://oar.imag.fr/
GNU General Public License v2.0
44 stars 23 forks source link

Allow job submission even if no resource match the property filter at the time of submission #101

Open npf opened 8 years ago

npf commented 8 years ago

Currently OAR refuses to accept job submission if not resource match a property filter at the time of submission. However, in some use cases, we would like to be able to submit such a job because we know that some resources will eventually get that property after some events.

$ oarsub "sleep 1h" -p "foo='bar'"
Properties: foo='bar'
There are not enough resources for your request
OAR_JOB_ID=-5
Oarsub failed: please verify your request syntax or ask for support to your admin.
capitn commented 8 years ago

In the admission rules I added:

$jobproperties_applied_after_validation

The content is merged to the '-p' oarsub argument but after the check of resource availability (used for the "drain" resource property). So it could be possible to reuse it in this situation.

But, now, there is no check of the SQL syntax validity (because it is used only by the admin in the admission rules)

npf commented 8 years ago

We would then let the user set the property which no resources match for at submission time, but move it from the $jobproperties to $jobproperties_applied_after_validation, so that oarsub does not reject the job.

Looks like ok. Too bad mangling the $jobproperties variable is not very nice to do.

npf commented 8 years ago

For the next version of OAR, we could maybe add a option to the oarsub command to let the user directy set these $jobproperties_applied_after_validation..

capitn commented 8 years ago

Yes, it is possible but we have to find a way to validate the SQL syntax otherwise the scheduler could crash .