Skip to main content

Module exit

Module exit 

Source
Expand description

The process exit codes of stratum, stable across releases.

CodeMeaning
0Success; for status, the node is ready
1Local failure: a key, token or resume file, the clock, or writing output
2The node could not be reached
3status: the node is unconfigured
4status: the node is degraded
5The node sent a response that does not follow the API contract
6Changes were previewed but not applied: no confirmation
7A local check refused the node’s answer (claim body, manifest signature, admission notice, probe, an offered grant the manifest does not render), a profile card that does not name its owner, or an ACL that would give an application Control
8A bounded wait ran out: join (the pod was not provisioned within --wait-secs) or member suspend --wait (the suspension was not yet enforced)
9export: the archive was written, but an entry changed, vanished or was skipped during the walk
10Server error bad_request
11Server error unauthorized
12Server error forbidden
13Server error not_found
14Server error conflict
15Server error payload_too_large
16Server error unsupported_media_type
17Server error invalid, or a preview that reports validation errors
18Server error too_many_challenges
19Server error backup_refused
20Server error internal
21A server error code this client does not know
22Server error request_timeout
23Server error capacity_exhausted
24Server error invitation_refused
25Server error invitations_disabled
26Server error gate_unavailable
27Server error too_many_requests
28Server error misdirected_request
29Server error method_not_allowed
30Server error insufficient_storage
31precondition_failed: a conditional pod write found another version
32Server error bad_gateway (the gate got no valid answer upstream)
33Server error gateway_timeout (the gate’s upstream did not answer in time)
34Server error suspended (the administrator suspended the membership the request depends on)
35Server error archive_required (member remove needs an archive from the current suspension)
36Server error pod_data_present (the key’s earlier pod data has not been purged)
38Server error pod_unavailable (the pod server cannot be reached, or the node has no pods)
39Server error workspace_unavailable (an installation asked for a workspace and no slot is available)
40Server error application_unavailable (the application is not approved)
41Server error image_absent or image_has_volumes (approval found the image missing from the tenant daemon, or declaring a volume)
42app install: a container’s ACL did not read back as written, or consent was refused (by the node, or because the installation stopped being pending_consent); consent was not sent or not recorded, and what was written was removed
43app withdraw or app cleanup: the grant’s ACL cleanup is still pending for at least one container
44An ACL the client would have to rewrite holds a statement it does not evaluate; nothing was written to that ACL
45Server error runner_unavailable (the node’s runner could not be reached or refused; an application’s approval stored nothing)
46Server error signer_unavailable (the node committed an installation’s create or consent, but the signer has not yet made or enabled its key; a rerun of the install, or app list, finishes a create, and the node itself finishes a consent)
64Invalid command line

Code 37 is unassigned. An earlier pre-release gave it to lease_expired, when that was only the gate’s log name for a decision. lease_expired is now the pod proxy’s 503 to a job, one of the JOB_ONLY_CODES no person meets, and like them exits 21 if it ever reaches the client.

Constants§

ACL_NOT_EVALUATED
An ACL the client would have to rewrite holds a statement it does not evaluate (an acl:agentGroup, an acl:origin, an agent class other than foaf:Agent, an unknown predicate or type, an ACL that is not Turtle); nothing was written to that ACL.
APPLICATION_UNAVAILABLE
Server error application_unavailable (HTTP 409): the application is withdrawn or disabled, so it cannot be installed.
ARCHIVE_REQUIRED
Server error archive_required (HTTP 409): member remove needs an archive taken during the member’s current suspension. Run member archive first, or waive it with --no-archive.
BACKUP_REFUSED
Server error backup_refused (HTTP 409): no backup recipient configured.
BAD_GATEWAY
Server error bad_gateway (HTTP 502): the gate got no valid answer from the pod server or the controller.
BAD_REQUEST
Server error bad_request (HTTP 400).
CAPACITY_EXHAUSTED
Server error capacity_exhausted (HTTP 409): every tenant slot is taken; the invitation is still issued.
CLEANUP_PENDING
app withdraw or app cleanup: the withdrawn grant’s ACL cleanup is still pending for at least one container; run stratum app cleanup again.
CONFLICT
Server error conflict (HTTP 409): stale revision, already bound or operation conflict.
DEGRADED
status: the node is degraded.
EXPORT_INCOMPLETE
export: the archive and manifest were written, but at least one entry changed, vanished or was skipped during the walk; the manifest lists them.
FAILURE
A local failure: a key, token or resume file, the clock, or output.
FORBIDDEN
Server error forbidden (HTTP 403).
GATEWAY_TIMEOUT
Server error gateway_timeout (HTTP 504): the pod server or the controller did not answer the gate in time. A write may or may not have happened; read before writing again.
GATE_UNAVAILABLE
Server error gate_unavailable (HTTP 503). From the node’s API: the gate could not be paused and drained for a backup. From the gate: pod writes are paused for a backup or archive, or the gate has not heard from the node’s controller in time (its directory lease ran out). The gate forwarded nothing, so the request can be retried shortly.
GRANT_NOT_CONFIRMED
app install did not complete its consent: a container’s ACL did not read back as written, the installation stopped being pending_consent before a write, or the node refused the consent. Consent was not sent, or not recorded, and the client removed what it had written (the error lists anything it could not remove).
IMAGE_REFUSED
Server error image_absent or image_has_volumes (HTTP 409): approval found the manifest’s image ID missing from the tenant daemon, or found that the image declares a volume.
INSUFFICIENT_STORAGE
Server error insufficient_storage (HTTP 507): the pod volume is low and writes are stopped.
INTERNAL
Server error internal (HTTP 500).
INVALID
Server error invalid, or a preview with validation errors. The node sends it with HTTP 422 on the configuration routes and with HTTP 400 for an application’s manifest (with error.field naming the member); the exit code follows the code, not the status.
INVITATIONS_DISABLED
Server error invitations_disabled (HTTP 403): membership.invitations_enabled is off.
INVITATION_REFUSED
Server error invitation_refused (HTTP 403): the invitation is unknown, expired, revoked, used or for another identity.
JOB_ONLY_CODES
The server error codes no person meets, which therefore have no exit code of their own and fall to UNKNOWN_SERVER_ERROR (21) if they ever reach the client.
METHOD_NOT_ALLOWED
Server error method_not_allowed (HTTP 405), including a DELETE of the root ACL.
MISDIRECTED_REQUEST
Server error misdirected_request (HTTP 421): Host is not the node’s canonical authority, so --origin is wrong.
NOT_CONFIRMED
Changes were previewed but not applied because nothing confirmed them.
NOT_FOUND
Server error not_found (HTTP 404).
OK
Success. For status, the node is ready.
PAYLOAD_TOO_LARGE
Server error payload_too_large (HTTP 413).
POD_DATA_PRESENT
Server error pod_data_present (HTTP 409): an invitation or redemption for a removed or cancelled key whose earlier pod data has not been purged yet.
POD_UNAVAILABLE
Server error pod_unavailable (HTTP 503): the pod server could not be reached or broke off (from the gate), or the node runs without pods or has no canonical origin yet (from the controller).
PRECONDITION_FAILED
precondition_failed (HTTP 412): --if-match named another version, or --create-only found the resource already there.
PROTOCOL
The node’s response does not follow the API contract.
REFUSED
A local check refused the node’s answer (including an offered grant the manifest does not render), or the client refused to write an ACL that would give an application Control.
REQUEST_TIMEOUT
Server error request_timeout (HTTP 408): the node gave up waiting for the request to arrive.
RUNNER_UNAVAILABLE
Server error runner_unavailable (HTTP 503): an application’s approval needs the node’s runner to read the image, and the runner is not configured, did not answer, or refused. Nothing was stored; approve again once the runner answers.
SIGNER_UNAVAILABLE
Server error signer_unavailable (HTTP 503): the node committed an installation’s create or consent, but the signer did not finish its step (making the application key, or confirming it enabled). The commit stays. After a create, app install again with the same --operation-id, or app list, finishes it (and so does the node’s next start); after a consent the node’s key sync keeps trying, and app show reports when the installation is active.
SUSPENDED
Server error suspended (HTTP 403): the administrator has suspended the membership the request depends on, the caller’s own or the pod owner’s. Signed requests by or to a suspended member are refused until the administrator resumes it; an existing public profile stays readable.
TIMED_OUT
A bounded wait ran out. For join, the pod was not provisioned within the wait; rerun join to continue. For member suspend --wait, the suspension is still enforcing; member show reports when it is enforced.
TOO_MANY_CHALLENGES
Server error too_many_challenges (HTTP 429).
TOO_MANY_REQUESTS
Server error too_many_requests (HTTP 429): over the admission rate limit.
UNAUTHORIZED
Server error unauthorized (HTTP 401).
UNCONFIGURED
status: the node is unconfigured.
UNKNOWN_SERVER_ERROR
A server error code this client does not know.
UNREACHABLE
The node could not be reached.
UNSUPPORTED_MEDIA_TYPE
Server error unsupported_media_type (HTTP 415).
USAGE
The command line could not be parsed.
WORKSPACE_UNAVAILABLE
Server error workspace_unavailable (HTTP 409): the installation asked for a workspace and the node has no slot for it. In Step 3b-2 every workspace mode other than none gets this answer.

Functions§

for_server_code
Returns the exit code for a server error code from the API contract.