Out Plane
hangar

hangar pause

Pause a Hangar, keeping its disk.

writesrepeatable--dry-run

Stops a Hangar's machine and keeps its disk. Everything running in its terminal stops, agents included, and anyone connected is disconnected. Files under /home/hangar stay where they were, and so do its ports, its variables and its idle timeout.

While it is paused, hangar connect and hangar restart are refused, and hangar resume starts it again on a new machine in under a minute. A Hangar with an idle timeout is paused the same way on its own once its terminal has been idle that long. See hangar update.

Usage

outplane hangar pause <HANGAR>

Arguments

ArgumentTypeDescription
HANGARstringHangar name or id. Required.

Output

FieldTypeDescription
hangarstringThe Hangar's immutable name.
hangarIdstring
pausedboolThe state the Hangar is now in.
changedboolFalse when it was already in that state, and for a dry run.

Examples

See what it would do, without sending it

outplane hangar pause myhangar --dry-run --json
{
  "changed": false,
  "hangar": "myhangar",
  "paused": true
}

Pause a Hangar

outplane hangar pause myhangar

Pause one and read the result in a pipeline

outplane hangar pause myhangar --json --fields paused,changed
{
  "changed": true,
  "paused": true
}

Pause one in another team

outplane hangar pause myhangar --team acme

What to Know

  • Idempotent. Pausing a Hangar that is already paused sends nothing, reports changed false and exits 0.
  • Files under /home/hangar, its ports, its variables and its idle timeout are kept either way.
  • Everything running in its terminal stops, agents included, and anyone connected is disconnected. Work that exists only in a running process is gone; files on the disk are not.
  • While it is paused, its status reads paused, hangar connect and hangar restart exit 6 with hangar.not_running, and hangar metrics reports null CPU and memory, not 0.
  • With an idle timeout, the platform checks every 5 minutes and pauses a Hangar whose terminal has had no output in any window and no key from anyone connected for that long, so 30m pauses it 30 to 35 minutes after the last activity. A paused Hangar keeps its disk, its ports and its variables, and outplane hangar resume starts it again.
  • 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:

ExitKindMeaning
2usageInvalid arguments, unknown flag, or client-side validation failure.
3authNot authenticated, token revoked or expired, or forbidden for this team.
5not_foundThe named resource does not exist, or is not visible to this credential.
6conflictThe resource already exists, or a concurrent change won.
8upstreamThe 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.

On this page