Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
wiki:some_examples_of_admission_rules [2020/04/07 21:49] neyronwiki:some_examples_of_admission_rules [2020/04/07 21:55] – [Example 5: verify correct resources definitions] neyron
Line 138: Line 138:
 </code> </code>
  
-==== 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 <code>oarsub -l ''resource request''</code> gives a correct resource definition.+ 
 +Verify that the ''oarsub -l [resource request]'' gives a correct resources definition.
  
 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 255: Line 254:
 Lets assume that valid resources hierarchies are: Lets assume that valid resources hierarchies are:
  
-  * switch > cluster > host > cpu > gpu > core +  * ''switch > cluster > host > cpu > gpu > core'' 
-  * cluster > switch > host > cpu > gpu > core +  * ''cluster > switch > host > cpu > gpu > core'' 
-  * cluster > switch > host > disk +  * ''cluster > switch > host > disk'' 
-  * switch > cluster > host > disk +  * ''switch > cluster > host > disk'' 
-  * license+  * ''license''
  
 Here both switch > cluster, or cluster > switch can be valid (some clusters spread their nodes on many switches, some clusters share a same switch). Disks are special resources to reserve disks on hosts, independently from cpu, gpu and cores. Licenses are yet a completly independente type of resources.  Here both switch > cluster, or cluster > switch can be valid (some clusters spread their nodes on many switches, some clusters share a same switch). Disks are special resources to reserve disks on hosts, independently from cpu, gpu and cores. Licenses are yet a completly independente type of resources. 
  
 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:
-  * <code>oarsub -l switch=2/core=1</code> → get 2 cores on different switches +  * ''oarsub -l switch=2/core=1'' → get 2 cores on different switches 
-  * <code>oarsub -l cluster=1/host=2/disk=1</code> → get 2 disks of 2 different hosts but on a same cluster +  * ''oarsub -l cluster=1/host=2/disk=1'' → get 2 disks of 2 different hosts but on a same cluster 
-  * oarsub -l license=1</code> → get 1 license+  * ''oarsub -l license=1'' → get 1 license
  
 But incorrect hierachry should raise an error: But incorrect hierachry should raise an error:
-  * oarsub -l gpu=1/host=2 → cannot get 2 hosts for a same gpu +  * ''oarsub -l gpu=1/host=2'' → cannot get 2 hosts for a same gpu 
-  * oarsub -l host=1/disk=1/core=1 → cannot mix disk and core+  * ''oarsub -l host=1/disk=1/core=1'' → cannot mix disk and core 
 +  * ''oarsub -l switch=1/cluster=1/switch=1'' → obviously wrong
  
 ==Answer== ==Answer==
wiki/some_examples_of_admission_rules.txt · Last modified: 2020/04/07 22:01 by neyron
Recent changes RSS feed GNU Free Documentation License 1.3 Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki