Pulse/internal/dockeragent
rcourtman a0f75b1bb2 fix(dockeragent): bound the collect cycle with a watchdog and pin hung-daemon deadline behavior
Follow-up to the 2026-07-17 live docker-update exercise where a DiskUsage
roundtrip against a colima daemon parked 6+ minutes even though
dockerCallWithRetry wraps every call in a 20s context.WithTimeout.

Investigation result: context deadline propagation through moby client
v0.5.0 (request.go, API-version negotiation) and the otelhttp transport
wrapper is intact. Reproducing with a deliberately hung unix-socket
daemon aborts DiskUsage at the deadline in both hang shapes (pre-header
and mid-body), so there is no client-library bug to fix or file
upstream; the production stall's root cause remains environmental
(deadline timer never fired process-side).

Containment and diagnosis:
- buildReport now runs under dockerCollectCycleTimeout (5m) so a wedged
  cycle can never stall the module indefinitely, plus an independent
  watchdog timer that logs an error with a full goroutine dump if the
  cycle outlives even that deadline - capturing exactly the evidence
  that was missing from the original incident.
- hung_daemon_deadline_test.go pins that a context deadline aborts the
  real moby client against a hung unix-socket daemon (pre-header and
  mid-body stalls), guarding future moby/otelhttp upgrades.

The incident note referenced a dockerCollectCycleTimeout watchdog as
already added; it did not exist on any branch - this commit is that
containment, landed for real.

Contract-Neutral: dockeragent collect-cycle watchdog containment: timeout plumbing only, no collection-semantics or contract-surface delta
2026-07-17 23:37:41 +01:00
..
agent.go Modernize Unified Agent lifecycle and platform support 2026-07-09 23:20:35 +01:00
agent_collect_test.go Use authoritative Docker OOM evidence 2026-07-15 17:55:26 +01:00
agent_concurrency_test.go Migrate Docker integrations to maintained Moby modules 2026-04-18 11:40:38 +01:00
agent_cpu_test.go Migrate Docker integrations to maintained Moby modules 2026-04-18 11:40:38 +01:00
agent_flow_test.go Migrate Docker integrations to maintained Moby modules 2026-04-18 11:40:38 +01:00
agent_flushbuffer_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
agent_http_test.go Make native agent tests Windows-safe 2026-07-09 23:51:50 +01:00
agent_image_digest_test.go Migrate Docker integrations to maintained Moby modules 2026-04-18 11:40:38 +01:00
agent_integration_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
agent_internal_test.go Modernize Unified Agent lifecycle and platform support 2026-07-09 23:20:35 +01:00
agent_log_test.go Improve agent update logging and installer warnings (related to #737) 2025-11-23 22:07:37 +00:00
agent_report_coverage_test.go Migrate Docker integrations to maintained Moby modules 2026-04-18 11:40:38 +01:00
cleanup.go Migrate Docker integrations to maintained Moby modules 2026-04-18 11:40:38 +01:00
cleanup_coverage_test.go Migrate Docker integrations to maintained Moby modules 2026-04-18 11:40:38 +01:00
collect.go fix(dockeragent): bound the collect cycle with a watchdog and pin hung-daemon deadline behavior 2026-07-17 23:37:41 +01:00
container_update.go Restore one-click Docker container updates through the typed action plane 2026-07-14 12:19:04 +01:00
container_update_test.go fix(docker-agent): preserve shared network namespaces through container updates 2026-07-12 19:48:18 +01:00
container_update_typed.go Restore one-click Docker container updates through the typed action plane 2026-07-14 12:19:04 +01:00
deps.go Migrate Docker integrations to maintained Moby modules 2026-04-18 11:40:38 +01:00
deps_coverage_test.go feat(dockeragent): improve test coverage and refactor registry dependencies 2025-12-29 09:57:45 +00:00
docker_client.go Expand Docker Swarm metadata inventory 2026-05-24 12:07:10 +01:00
env_mask_test.go feat: Display environment variables for Docker containers 2025-12-25 23:52:57 +00:00
hardening.go fix(dockeragent): bound the collect cycle with a watchdog and pin hung-daemon deadline behavior 2026-07-17 23:37:41 +01:00
hardening_test.go fix(dockeragent): bound the collect cycle with a watchdog and pin hung-daemon deadline behavior 2026-07-17 23:37:41 +01:00
http_limits.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
hung_daemon_deadline_test.go fix(dockeragent): bound the collect cycle with a watchdog and pin hung-daemon deadline behavior 2026-07-17 23:37:41 +01:00
image_ref_test.go fix: Docker container update detection showing false positives 2025-12-29 13:49:04 +00:00
registry.go Negotiate registry pull tokens from WWW-Authenticate challenges 2026-07-16 19:50:04 +01:00
registry_coverage_test.go Negotiate registry pull tokens from WWW-Authenticate challenges 2026-07-16 19:50:04 +01:00
registry_http_test.go Enhance devcontainer and CI workflows 2026-01-01 22:29:15 +00:00
registry_manifest_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
registry_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
runtime_coverage_test.go Migrate Docker integrations to maintained Moby modules 2026-04-18 11:40:38 +01:00
self_update.go Keep self-update preflight tokens out of argv 2026-04-22 08:12:35 +01:00
self_update_test.go Make native agent tests Windows-safe 2026-07-09 23:51:50 +01:00
signature.go Require signed unified agent release assets 2026-04-22 02:00:29 +01:00
signature_test.go Require signed unified agent release assets 2026-04-22 02:00:29 +01:00
swarm.go Use node-local task counts for node-scoped swarm services 2026-06-04 10:16:09 +01:00
swarm_coverage_test.go Use node-local task counts for node-scoped swarm services 2026-06-04 10:16:09 +01:00
swarm_test.go Migrate Docker integrations to maintained Moby modules 2026-04-18 11:40:38 +01:00
system.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
system_coverage_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
systemd_test.go Make native agent tests Windows-safe 2026-07-09 23:51:50 +01:00
test_helpers_test.go Expand Docker Swarm metadata inventory 2026-05-24 12:07:10 +01:00
update_all.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
version.go Harden unified agent update preflight 2026-06-02 23:54:48 +01:00