Icon

This is the documentation for an older version of Qube. The latest version of the documentation can be found here: Qube

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Restrictions are used to allow or restrict where jobs run, and are applied to both jobs and workers.  Restrictions are based on cluster names, but differ from the clusters themselves by an important difference:

Note

Jobs and workers can belong to 1 and only 1 cluster, but can be restricted to none, 1, or several clusters

This seems a bit hard to fathom, until you remember that a job has preferential priority on a worker whose cluster matches the job's cluster, but the job is free to run on any host in other clusters.  The job's restriction value can be used to limit what other clusters the job could possibly run on.

...

/[<segment>/][<segment>/][+|*]

  • + means all hosts at that level and below* means only the first level below.
  • + means all levels below that level, regardless of depth in the hierarchy.
  • * means only hosts at that level.
Note
Tip

The restriction value is actually evaluated as an expression, and multiple clusters are specified in a "this cluster OR that cluster OR the other cluster" type of string, with the "||" symbol to mean OR.

Examples

Worker Restrictions

...

Define a host that will only run jobs in /hello/world, but do not include lower levels:

  • /hello/world

Accept jobs in /hello and all levels below:

  • /hello/+

Accept only jobs below /hello/… but not including /hello:

  • /hello/*

Accept jobs in /hello or /goodbye:

  • /hello || /goodbye

Job Restrictions Examples

Run on workers in /hello/world, but do not include lower levels:

  • /hello/world

Run on workers in /hello and all levels below:

  • /hello/+

Run on workers only below /hello/… but not including /hello:

  • /hello/*

Run on workers in /hello or /goodbye:

  • /hello || /goodbye

private/very/deep

worker_cluster = "/private/very/deep" 

worker_restrictions = "/private/very/deep" 

 

Define a host that will run jobs in any cluster at /private or 1 level below - done with the *

worker_cluster = "/private" 

worker_restrictions = "/private or /private/*" 

 

Define a host that will only run jobs in /private/very or any level below - done with the +

worker_cluster = "/private/very" 

worker_restrictions = "/private/very or /private/very/+" 

Job Restrictions

Submit a job that will have highest priority in /private and run only in /private:

qbsub -cl /private -restr /private <cmd>

 

Submit a job that will have highest priority in /private/very, but could run in any host in /private or in the first level below /private

qbsub -cl /private/very -restr '/private or /private/*' <cmd>

 

Submit a job that will have highest priority in /private/very/deep, but could run in any host at any level at /private or below

qbsub -cl /private/very/deep -restr '/private or /private/+' hostname