Skip to content

What draining this node would do to each of its instances.

GET
/v1/compute/nodes/{nodeId}/evacuation-plan
Code sample: Shell / cURL
curl --request GET \
--url https://stratum.example.com/v1/compute/nodes/example/evacuation-plan \
--header 'Authorization: Bearer <token>'

Read-only and safe to poll: it moves nothing and reserves nothing.

Answers the question an operator has before a drain — which guests are interrupted, and why — rather than leaving it to be discovered as the drain runs. Destination availability is advisory for the same reason it is free: no capacity is reserved, so a node with room now can be full by the time the drain reaches that instance.

nodeId
required
string
/^n-[a-z0-9-]+$/

The plan.

Media typeapplication/json

What draining a node would do to each instance on it, computed without moving or reserving anything.

object
nodeId
required
string
/^n-[a-z0-9-]+$/
nodeState
required

The node’s current admission state.

string
items
required
Array<object>

One instance’s fate under a drain.

object
instanceId
required
string
/^i-[a-z0-9]+$/
projectId
required
string
name
string
state
required

The instance’s current state.

string
method
required

How this instance would leave, in order of increasing disruption: live (running, uninterrupted), rehome (stopped, only its home node changes), cold (volume copied), blocked (cannot leave), skip (nothing to do).

string
Allowed values: live rehome cold blocked skip
disruptive
required

Whether carrying this out stops a running guest. Answered directly rather than left to be inferred from method, because it is the thing the operator is actually asking.

boolean
reason
required

Why this method and not a gentler one, in terms an operator can act on e.g. “root volume is on the node-local lvm-thin driver”.

string
live

Instances that would move with no interruption.

integer
rehome

Stopped instances whose home node alone would change.

integer
cold

Instances whose volume would be copied. Includes both the free case (already stopped) and the disruptive one (running, must be stopped) read disruptive for the part that interrupts a tenant.

integer
blocked

Instances that cannot leave this node at all.

integer
skipped

Instances needing nothing — terminal, or already moving.

integer
disruptive

Instances that would be STOPPED. This is the number the drain gates on: non-zero means the call needs allowDisruption.

integer

Example

{
"items": [
{
"method": "live"
}
]
}

Resource not found.

Media typeapplication/problem+json
object
type
required
string format: uri
title
required
string
status
required
integer
>= 400 <= 599
detail
string
instance
string format: uri-reference
requestId
required
string
code
required
string
issues

The findings of a rejected IAM policy document (custom and resource policies).

Array<object>

One finding of a rejected IAM policy document. A rejection lists every finding, so the author fixes the document in one round trip.

object
code
required

The finding, e.g. INVALID_DOCUMENT, UNKNOWN_ACTION, ACTION_NOT_APPLICABLE.

string
statement
required

Index of the statement at fault; -1 for the document as a whole.

integer
>= -1
detail
required
string
action

The offending action, where one is at fault (ACTION_NOT_APPLICABLE).

string
errors

Field errors, for codes that carry them: each problem at its field (see FieldError). Documented on the responses that set it, e.g. approveNodeJoin’s INVALID_INPUT and JOIN_APPROVAL_REFUSED. Absent otherwise.

Array<object>

One field’s problem, the stage-2 installer API’s shape. field is the field’s path, message what is wrong with it.

object
field
required

The field’s path, e.g. links[0].interface, disks[1].confirm, mgmt.address or role; empty for the whole request.

string
message
required
string
details

Structured facts about the refusal, for codes that carry them. The shape is fixed per code and documented on the response that answers it, e.g. IMAGE_POOL_MISMATCH (see ImagePoolMismatchDetails) and IMAGE_IN_USE. Absent for codes that carry none.

object
key
additional properties
any

Example

{
"issues": [
{
"code": "ACTION_NOT_APPLICABLE",
"action": "compute:CreateVpc"
}
]
}