hangar resume
Start a paused Hangar again.
Starts a paused Hangar again, on a new machine with the same disk. Files under
/home/hangar are where they were, and so are its ports, its variables and its idle
timeout. What was running before the pause does not come back on its own. It starts with
the variables, groups and ports saved for it, so a change made with
env set --hangar or
env group assign --hangar while it was paused applies now.
It is back in under a minute, with a window for each agent again. Wait until status has
read deploying and then ready: a ready in the first few seconds can still be the
state from before the pause. hangar connect is refused until then. Resuming a Hangar that is not
paused changes nothing.
Usage
outplane hangar resume <HANGAR>Arguments
| Argument | Type | Description |
|---|---|---|
HANGAR | string | Hangar name or id. Required. |
Output
| Field | Type | Description |
|---|---|---|
hangar | string | The Hangar's immutable name. |
hangarId | string | |
paused | bool | The state the Hangar is now in. |
changed | bool | False when it was already in that state, and for a dry run. |
Examples
See what it would do, without sending it
outplane hangar resume myhangar --dry-run --json{
"changed": false,
"hangar": "myhangar",
"paused": false
}Resume a Hangar
outplane hangar resume myhangarResume one and read the result in a pipeline
outplane hangar resume myhangar --json --fields paused,changed{
"changed": true,
"paused": false
}Resume one in another team
outplane hangar resume myhangar --team acmeWhat to Know
- Idempotent. Resuming a Hangar that is not paused sends nothing, reports changed false and exits 0, whatever its status.
- Files under /home/hangar, its ports, its variables and its idle timeout are kept either way.
- The command returns once the resume is accepted, not once the Hangar runs. It is back in under a minute: poll
outplane hangar get <name> --json --fields statusuntil it has read deploying and then ready; a ready in the first few seconds can still be the state from before the pause.hangar connectis refused with hangar.not_running until then. - It starts on a new machine, so nothing that was running before the pause comes back on its own.
- It starts with the variables, variable groups and ports saved by then, so a change saved with
outplane env set --hangaroroutplane env group assign --hangarwhile it was paused takes effect. - Exit 6 with hangar.never_started means the Hangar has no machine to stop or start. retryable is true while it is still starting for the first time; otherwise deleting it and creating it again is the way back.
Errors
Beyond 0 for success, this command exits with:
| Exit | Kind | Meaning |
|---|---|---|
2 | usage | Invalid arguments, unknown flag, or client-side validation failure. |
3 | auth | Not authenticated, token revoked or expired, or forbidden for this team. |
5 | not_found | The named resource does not exist, or is not visible to this credential. |
6 | conflict | The resource already exists, or a concurrent change won. |
8 | upstream | The Out Plane API returned a server error. |
The code on the error object is one of hangar.never_started, hangar.not_found, hangar.ambiguous, usage.missing_argument, usage.empty_argument, context.no_team. Branch on that, or on the exit status. The message is prose and changes.