Skip to main content

Module failure

Module failure 

Source
Expand description

Why a replica did not come up.

A replica that fails its rollout is deleted at once and the controller tries again, so by the time anyone asks for its logs the instance is gone (or dying, and incus answers the console request with an error). The controller therefore reads the failed instance’s output before it deletes it, puts the last lines in the failure message (the deployment log, the service’s status) and keeps them here for app_logs and stack_logs, which show them beside the live replicas’ logs. The deployment that was rolling out keeps them too, so they outlive a restart of the daemon.

Structs§

FailedAttempt
The output of the last replica of a service that failed to come up.
Failures
The last failed attempt of each (stack, service).

Constants§

IMAGE_RETRY
The first wait after a replica failed because its image is missing.
IMAGE_RETRY_MAX
The longest wait between such attempts.
OUTPUT_BYTES
The most of them kept (the end): a few of these sit in every deployment record.

Functions§

explain
The failure of replica name with its last output in the message, and the attempt to keep. Called before the instance is deleted.
image_missing
Why a replica’s image could not be pulled, in plain words, when that is why it failed: image docker:x:1 not found (manifest unknown). None for any other failure, and for a registry that did not answer (that may pass by itself).
one_line
The last n non-empty lines of text, joined with | and cut to max characters (from the front: the end is what explains it).
replica_logs
Recent output of a service’s replicas (or one slot’s), by instance. A replica that is being replaced as this is asked, or whose output cannot be read, shows why in place of its text instead of failing the call.
retry
After a replica could not be created: how long to wait before the next attempt (prev was the last wait), and the service’s message. An image its registry does not have will not appear by itself (until someone pushes it), so that waits longest, and is said plainly instead of in incus’ words.