Files
Pulse/pkg
rcourtman 60d8478ee2 Leave finished containers out of the offline alert
Pulse raised a container state warning for every exited container. A
migration or init container that ended with exit code 0 therefore sat in
the alert list and the Patrol Inbox as a problem waiting for a decision,
and its warning spent one of Patrol's four hourly looks at long-standing
alerts. Issue 1677 reported the same noise for TrueNAS init containers.

Exit code 0 alone cannot tell a finished job from a service that was
stopped gracefully, and the agent did not report what can: the restart
policy. It now sends Docker's policy name for every container. The state
check leaves a container alone when it exited 0, was not OOM killed, has
the policy "no" or "on-failure" (Docker leaves a clean exit down under
both) and ran for less than an hour.

The run time is there for a service that has no restart policy. It exits
0 when Docker shuts down for a host reboot and then stays down, and that
outage has to alert. Jobs run for minutes and services for days, so one
hour separates them; a container with no start or finish time is never
called finished.

Everything else alerts as before, including a container under "always"
or "unless-stopped" and any container whose agent is too old to report
the policy. An override that carries its own offline severity for a
container still alerts on a finished job, because it is an explicit
request to hear whenever that container is not running.
2026-11-12 08:43:09 +00:00
..