Skip to content

Job

Jobs are what DRP uses to track the state of running individual tasks on a machine. There can be at most one current job for a machine at any given time.

Field Definition Value
Uuid The randomly generated UUID of the job.
Previous The UUID of the job that ran prior to this one. The job history of a machine can be traced by following the previous UUIDs until you get to the all-zero UUID.
Machine The UUID of the machine that the job was created for.
Task The name of the task that the job was created for.
Workflow The name of the workflow that the job was created in
Stage The name of the stage that the job was created in.
BootEnv The name of the bootenv that the job was created in.
Context The name of the context the job was created for.
State The state of the job. State must be one of the following:
This is the state that all freshly-created jobs start at. created
Jobs are automatically transitioned to this state by the machine agent when it starts executing this job's actions. running
Jobs are transitioned to this state when they fail for any reason. failed
Jobs are transitioned to this state when all their actions have completed successfully. finished
Jobs are transitioned to this state when an action signals that the job must stop and be restarted later as part of its action. incomplete
ExitState The final disposition of the Job. Values can be one of the following:
Indicates that the job stopped executing due to the machine needing to be rebooted. reboot
Indicates that the job stopped executing because the machine needs to be powered off. poweroff
Indicates that the job stopped because an action indicated that it should stop executing. stop
Indicates that the job finished. complete
StartTime The time the job entered the running state.
EndTime The time the job entered the finished or failed state.
Archived Whether it is possible to retrieve the log the job generated while running.
Current Whether this job is the most recent for a machine or not.
CurrentIndex The value of the machine's CurrentTask field when this job was created.
NextIndex The value of CurrentIndex plus one.
ResultErrors A list of errors from the task. This is filled in by the task if it is written to do so. This tracks results without requiring job logs.

Job Actions

Once a Job has been created and transitioned to the running state, the machine agent will request that the Templates in the Task for the job be rendered for the Machine and placed into JobActions. JobActions have the following fields:

Field Definition
Name The name of the JobAction. It is present for informational and troubleshooting purposes, and the name does not effect how the JobAction is handled.
Content The result of rendering a specific Template from a Task against a Machine.
Path If present, the Content will be written to the location indicated by this field, replacing any previous file at that location. If Path is not present or empty, then the Contents will be treated as a shell script and be executed.