Skip to content

docs: document engine container event sequences in up monitor - #14024

Open
ndeloof wants to merge 1 commit into
mainfrom
doc-monitor-container-events
Open

docs: document engine container event sequences in up monitor#14024
ndeloof wants to merge 1 commit into
mainfrom
doc-monitor-container-events

Conversation

@ndeloof

@ndeloof ndeloof commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

What I did
Documentation-only: add a comment block above monitor.Start mapping, per container lifecycle scenario, the exact event sequences the engine emits and the monitor may receive — natural exit, policy-driven restart (die/start only, no restart action, complete silence during backoff), external stop of a running vs restarting container, ContainerRestart, docker kill, OOM kill, rm -f / rm.

Mapped from moby's daemon sources (LogContainerEvent call sites, handleContainerExit, containerStop/containerRestart/kill paths) and verified against a live engine v29.6.1 with docker events. Two findings worth calling out: the relative order of stop and die on a container stop is not guaranteed, and a container stopped while in restart backoff emits stop only (the root cause of #13985).

Related issue
Context for #13985 / #13990.

@ndeloof
ndeloof requested review from a team as code owners August 11, 2026 11:58
@ndeloof
ndeloof requested a review from glours August 11, 2026 11:58
Map, per container lifecycle scenario, the exact event sequences the
engine emits and the monitor may receive: natural exit, policy-driven
restart (die/start only, no restart action, silence during backoff),
external stop of a running vs restarting container, ContainerRestart,
docker kill, OOM kill, rm -f and rm.

Mapped from moby's daemon sources (LogContainerEvent call sites and
handleContainerExit/containerStop/containerRestart/kill paths) and
verified against a live engine v29.6.1 with 'docker events'. Notably:
the relative order of stop and die on a container stop is not
guaranteed, and no event at all is emitted while a container sits in
restart backoff.

Related to #13985 / #13990.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
@ndeloof
ndeloof force-pushed the doc-monitor-container-events branch from 51a2ce7 to 1e8654a Compare August 11, 2026 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant