Versions Compared

    Key

    • This line was added.
    • This line was removed.
    • Formatting was changed.

    Job and Worker Restrictions

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

    ...

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

    ...

    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 workerWorker).

    Restrictions defined for

    ...

    Workers

    When a worker 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.

    ...

    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_restrictions = "/private or /private/*" 

     


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

    ...

    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

    ...