23.7 Cloud-Specific Job Template Attributes

The table below details the job template attributes that relate specifically to workload-driven cloud services.

DESTROYTEMPLATE
<templateName>
JSET
When this job is canceled, Moab creates a new job and applies the specified template (must be a generic system job). The original job remains until the new job successfully completes. The job created by DESTROYTEMPLATE is the cancel action for the original job.
JOBCFG[VMTracking]      GENERICSYSJOB=TRUE
JOBCFG[VMTracking]      DESTROYTEMPLATE=destroyVM
 
JOBCFG[destroyVM]       GENERICSYSJOB=TRUE
JOBCFG[destroyVM]       TRIGGER=EType=start,AType=exec,Action="$HOME/destroy.py $VMID",timeout=5:00
When the VMTracking job is canceled, the destroyVM job is created. When that completes, VMTracking is removed.
   
GENERICSYSJOB
<BOOLEAN> : TRUE | FALSE
JSET

Causes the job template to create a special type of system job (a generic system job) that does the following:

  • runs for the duration of the trigger to which it is attached
  • shares an exit code with the trigger
  • must have one and only one trigger attached to it, and this trigger must meet certain requirements (See Generic System Job Trigger Requirements).

See Creating a Generic System Job for more information.

JOBCFG[test]      GENERICSYSJOB=TRUE
JOBCFG[test]      TRIGGER=EType=start,AType=exec,Action="$HOME/setupSoftware.py $IPAddr",Time=5:00
   
INHERITRES
<BOOLEAN> : TRUE | FALSE
JSET
This job inherits the resource definition of the job that created it (via TEMPLATEDEPEND). The job that finishes first will pass its allocation directly to the next job.
JOBCFG[test]     INHERITRES=TRUE
   
MIGRATETEMPLATE
<templateName>
JSET

When this job is relocated, Moab creates a new job and applies the specified template (must be a generic system job). The original job remains until the new job successfully completes. The job created by MIGRATETEMPLATE is the migrate action for the original job.

JOBCFG[VMTracking]      MIGRATETEMPLATE=migrateVM
 
JOBCFG[migrateVM]       GENERICSYSJOB=TRUE FLAGS=NORMSTART
JOBCFG[migrateVM]       TRIGGER=EType=start,AType=exec,Action="$HOME/migrate.py $VMID $MASTERHOST",timeout=5:00
When the VMTracking job is moved, the migrateVM job is created. When that completes, VMTracking migrates to the desired location.
   
TEMPLATEDEPEND
  <dependencyType>:<templateName>
JSET
Specifies when the job should run based on other jobs in the workflow. See the Job Dependency Syntax table for details.
JOBCFG[test]      TEMPLATEDEPEND=AFTEROK:test2
   
VMUSAGE
  <requirepm|createvm>
JSET
Specifies whether this job has restrictions related to running on a physical or virtual machine. Valid options include:
  • requirepm - job must run on a physical machine. This setting tells Moab that you are using a normal HPC job.
  • createvm - job must run on a hypervisor that can create a VM with the specified image.

See Scheduling Jobs When VMs Exist for details.

JOBCFG[test]      VMUSAGE=createvm
A job with the test template applied must run on a hypervisor that can supports the VM it sets up.

Copyright © 2012 Adaptive Computing Enterprises, Inc.®