What draining this node would do to each of its instances.
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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Responses
Section titled “Responses”The plan.
What draining a node would do to each instance on it, computed without moving or reserving anything.
object
The node’s current admission state.
One instance’s fate under a drain.
object
The instance’s current state.
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).
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.
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”.
Instances that would move with no interruption.
Stopped instances whose home node alone would change.
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.
Instances that cannot leave this node at all.
Instances needing nothing — terminal, or already moving.
Instances that would be STOPPED. This is the number the drain gates on:
non-zero means the call needs allowDisruption.
Example
{ "items": [ { "method": "live" } ]}Resource not found.
object
The findings of a rejected IAM policy document (custom and resource policies).
One finding of a rejected IAM policy document. A rejection lists every finding, so the author fixes the document in one round trip.
object
The finding, e.g. INVALID_DOCUMENT, UNKNOWN_ACTION, ACTION_NOT_APPLICABLE.
Index of the statement at fault; -1 for the document as a whole.
The offending action, where one is at fault (ACTION_NOT_APPLICABLE).
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.
One field’s problem, the stage-2 installer API’s shape.
field is the field’s path, message what is wrong with it.
object
The field’s path, e.g. links[0].interface, disks[1].confirm,
mgmt.address or role; empty for the whole request.
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
Example
{ "issues": [ { "code": "ACTION_NOT_APPLICABLE", "action": "compute:CreateVpc" } ]}