Worker states and lifecycle
A worker is a host in a fleet that runs the tasks that make up your
jobs. Each worker runs the Deadline Cloud worker agent, which connects the host to your farm. Every
worker has a status, on both service-managed and customer-managed fleets.
You can see the status in the worker status column of the Deadline Cloud monitor and in the
status field that the GetWorker
and ListWorkers
operations return. The status shows whether the worker is available for work, shutting down,
or no longer connected. It also determines whether Deadline Cloud
charges for the worker.
Worker statuses
The following table lists the worker statuses in lifecycle order.
| Status | Description |
|---|---|
|
The worker agent registered the worker, and Deadline Cloud acknowledged the registration. The worker isn't ready for work yet. |
|
The worker is connected and ready to receive tasks. |
|
The worker is connected, and Deadline Cloud has no tasks assigned to it. |
|
The worker is connected, and Deadline Cloud has assigned tasks to it. |
|
The worker is shutting down and doesn't accept new tasks. |
|
The worker isn't running tasks, won't receive new tasks, and no longer sends heartbeats. Deadline Cloud still knows about the worker. The host can be shut down. |
|
Deadline Cloud stopped receiving heartbeats from the worker, for example after a lost connection or a host failure. |
|
The worker's capabilities don't meet the worker requirements of the fleet. |
The status determines whether Deadline Cloud charges for the worker. For the statuses that incur a charge, see Charges for workers in the Deadline Cloud User Guide.
What changes a worker's status
The following diagram shows how a worker that runs the Deadline Cloud worker agent moves between statuses. The changes are the same on service-managed and customer-managed fleets. If you write your own worker agent, follow the same changes.
A new worker is registered with the CREATED status (1) and changes to
STARTED when it's ready for work (2). While connected, it moves between
IDLE and RUNNING as tasks are assigned (3). A connected worker
changes to STOPPING when it starts to shut down (4), to STOPPED
when it finishes shutting down (5), to NOT_RESPONDING when it stops sending
heartbeats (6), and to NOT_COMPATIBLE when it no longer meets the fleet's
requirements (7). A STOPPING or NOT_COMPATIBLE worker also changes
to STOPPED (5), and a CREATED worker that stops sending heartbeats
changes to NOT_RESPONDING (6). A STOPPED or
NOT_RESPONDING worker returns to STARTED when the worker agent
connects again (8, a dashed arrow). The diagram shows a STOPPED worker being
deleted (9), which is the usual path. You can also delete a CREATED
worker. Each number matches a row in the table that follows the
diagram, which describes the cause of each change.
In the diagram, the connected area holds STARTED, IDLE, and
RUNNING. The not-connected area holds STOPPED,
NOT_RESPONDING, and NOT_COMPATIBLE. NOT_RESPONDING
and NOT_COMPATIBLE indicate a problem. CREATED,
STOPPING, and the deleted state sit outside both areas.
The following table lists each change and its cause.
| Arrow | From | To | What causes the change |
|---|---|---|---|
1 |
(none) |
|
The worker agent registers the worker with the CreateWorker operation. |
2 |
|
|
The worker agent obtains its credentials and reports that it's ready for work. |
3 |
|
|
Deadline Cloud sets |
4 |
|
|
The worker starts to shut down. Deadline Cloud asks the worker to stop, for example when the fleet scales in, or the worker agent starts a drain after an operating system stop signal or an Amazon EC2 Spot interruption. The worker stops accepting new tasks. |
5 |
|
|
The worker agent finishes shutting down and reports the new status with
the UpdateWorker
operation. The worker agent also sets |
6 |
|
|
Deadline Cloud stops receiving heartbeats from the worker agent. |
7 |
|
|
You update the fleet, and the worker's capabilities no longer meet the fleet's worker requirements. |
8 |
|
|
The worker agent connects again, for example after you restart the
agent or the host. A |
9 |
|
Deleted |
You or the worker agent delete the worker with the DeleteWorker operation. Deadline Cloud no longer tracks a deleted worker. |
For information about shutting down Amazon Elastic Compute Cloud (Amazon EC2) instances when their workers stop, see Configure the Deadline Cloud worker agent.