This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
wiki:some_examples_of_admission_rules [2020/04/07 21:49] – neyron | wiki:some_examples_of_admission_rules [2020/04/07 21:52] – [Example 5: verify correct resources definitions] neyron | ||
---|---|---|---|
Line 138: | Line 138: | ||
</ | </ | ||
- | ==== Example 4: | + | ==== Example 4: limit access to a queue, based on usernames set in a file ==== |
- | + | ||
- | Limit access to a queue, based on usernames set in a file | + | |
==Answer== | ==Answer== | ||
Line 163: | Line 161: | ||
- | ==== Example 5: ==== | + | ==== Example 5: give a more privilege to the owners of nodes ==== |
Give a more privilege to the owners of nodes (e.g. people who payed for the nodes) to submit, by restricting others to besteffort jobs: | Give a more privilege to the owners of nodes (e.g. people who payed for the nodes) to submit, by restricting others to besteffort jobs: | ||
* non-owners compete on the resources according to the scheduling policy of the besteffort queue ; | * non-owners compete on the resources according to the scheduling policy of the besteffort queue ; | ||
Line 248: | Line 246: | ||
(There may be some limitations in that property filtering, which could allow malicious users to overcome the usage policy) | (There may be some limitations in that property filtering, which could allow malicious users to overcome the usage policy) | ||
- | ==== Example 5: ==== | + | ==== Example 5: verify correct resources definitions |
- | Verify that the < | + | |
+ | Verify that the < | ||
OAR resource request hierarchies are implicit in the OAR database, but they can be enforced by an admission rule. | OAR resource request hierarchies are implicit in the OAR database, but they can be enforced by an admission rule. | ||
Line 264: | Line 263: | ||
Any of those resources properties can define a valid hierarchy or resources, for instance: | Any of those resources properties can define a valid hierarchy or resources, for instance: | ||
- | * < | + | * < |
- | * < | + | * → get 2 cores on different switches |
- | * oarsub -l license=1</ | + | * < |
+ | * → get 2 disks of 2 different hosts but on a same cluster | ||
+ | * < | ||
+ | * → get 1 license | ||
But incorrect hierachry should raise an error: | But incorrect hierachry should raise an error: | ||
- | * oarsub -l gpu=1/ | + | * oarsub -l gpu=1/ |
- | * oarsub -l host=1/ | + | * → cannot get 2 hosts for a same gpu |
+ | * oarsub -l host=1/ | ||
+ | * → cannot mix disk and core | ||
==Answer== | ==Answer== |