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§
- Failed
Attempt - 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
namewith 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).Nonefor any other failure, and for a registry that did not answer (that may pass by itself). - one_
line - The last
nnon-empty lines oftext, joined with|and cut tomaxcharacters (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 (
prevwas 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.