Instance States¶
Every instance has a state that reflects what it is currently doing. You can see the current state in the instance list and on the instance detail view. The state also governs which Actions are available at any given time.
Normal Lifecycle¶
In normal operation an instance is Healthy. Changing its configuration marks it Pending Update until you apply the change with Update; Update, Restart, and Recover each return it to Healthy when they finish, and Destroy is terminal.
stateDiagram-v2
direction TB
state "Pending Update" as PendingUpdate
state "Building Image" as BuildingImage
state update_choice <<choice>>
[*] --> Creating: Create
Creating --> Healthy
Healthy --> PendingUpdate: on configuration change
PendingUpdate --> update_choice: Update
update_choice --> BuildingImage: requires a new image
update_choice --> Updating
BuildingImage --> Updating: build succeeds
BuildingImage --> PendingUpdate: build fails
Updating --> Healthy
Healthy --> Restarting: Restart
Restarting --> Healthy
Healthy --> Recovering: Recover
Recovering --> Healthy
Healthy --> Destroying: Destroy
Destroying --> [*]
Error Handling¶
If an operation fails, the instance enters Errored. From there you can correct the change and Update to retry, Recover to redeploy the last known-good image, or Destroy the instance.
stateDiagram-v2
direction LR
[*] --> Errored: an operation fails
Errored --> Updating: Update
Updating --> Healthy
Errored --> Recovering: Recover
Recovering --> Healthy
Errored --> Destroying: Destroy
Destroying --> [*]