client_restrictions = restrictions
The client applications will use restrictions as the default job restriction if not specified.
Job and Worker Restrictions
Restrictions are used to allow or restrict where jobs run, and are applied to both jobs and Workers. Restrictions are based on cluster names. A job has preferential priority on a Worker whose cluster matches the job's cluster, but the job is free to run on any Worker in any other cluster, subject to the restrictions defined here.
Restrictions defined for jobs
When a job has a restriction defined, it means only run on hosts that satisfy the restriction expression. Hosts that don't satisfy the restriction expression won't be considered as dispatch candidates (the job will never be sent to that Worker).
Restrictions defined for Workers
When a Worker has a restriction defined via its worker_restrictions value, it means only run jobs whose cluster value matches one of the clusters in that worker's restriction expression. The worker won't accept jobs whose cluster doesn't match one of the clusters in the worker's restriction expression.
A restriction is really defined as a "filter" for hosts based upon information in the queuing algorithm; the values are one or more cluster names. In the priority/cluster queuing system, a user specifies the restrictions with a directory structure format:
- * means only the first level below.
- + means all levels below that level, regardless of depth in the hierarchy.
|Submit a job that will have highest priority in /private and run only in /private|
Submit a job that will have highest priority in /private/very, but could run in any host in
Submit a job that will have highest priority in /private/very/deep, but could run in any
|Define a host that will only run jobs in /private/very/deep|
|Define a host that will only run jobs in /private/very or any level below - done with the +|
No job restrictions.