GRM-156: Harden rootless Docker daemon resilience on CI runners #239

Merged
emo merged 2 commits from GRM-156-docker-daemon-resilience into master 2026-08-05 13:50:37 +00:00
Owner

Summary

CI molecule tests on infra (OBL-INFRA-511) were failing with two Docker daemon instability patterns on the grm-managed runners:

  1. Stuck container kill (infra job 30752): 500 Server Error: cannot kill container: tried to kill container, but did not receive an exit event
  2. Simultaneous daemon unresponsiveness (infra run 3416): 5 of 6 molecule jobs died at the same instant with context deadline exceeded on the Docker socket

Changes

  • daemon.json: Add live-restore, shutdown-timeout (30s), max-concurrent-downloads/uploads (3), default-ulimits (nofile 1M)
  • healthcheck: Add 10s timeout to docker info, stuck container detection (removing/stopping state) + force-cleanup, container/network prune
  • prune service: Add container, network, and builder-cache cleanup
  • healthcheck interval: Reduced from 5min to 2min
  • molecule template-content: Updated verify tests for new content

Testing

  • ansible-lint pass
  • molecule test -s template-content pass (converge + idempotence + verify)

Closes GRM-156

Generated with Devin

## Summary CI molecule tests on infra (OBL-INFRA-511) were failing with two Docker daemon instability patterns on the grm-managed runners: 1. **Stuck container kill** (infra job 30752): `500 Server Error: cannot kill container: tried to kill container, but did not receive an exit event` 2. **Simultaneous daemon unresponsiveness** (infra run 3416): 5 of 6 molecule jobs died at the same instant with `context deadline exceeded` on the Docker socket ## Changes - **daemon.json**: Add `live-restore`, `shutdown-timeout` (30s), `max-concurrent-downloads/uploads` (3), `default-ulimits` (nofile 1M) - **healthcheck**: Add 10s timeout to `docker info`, stuck container detection (removing/stopping state) + force-cleanup, container/network prune - **prune service**: Add container, network, and builder-cache cleanup - **healthcheck interval**: Reduced from 5min to 2min - **molecule template-content**: Updated verify tests for new content ## Testing - ansible-lint pass - molecule test -s template-content pass (converge + idempotence + verify) Closes GRM-156 Generated with [Devin](https://devin.ai)
emo added 1 commit 2026-08-05 13:34:04 +00:00
fix: harden rootless Docker daemon resilience on CI runners
CI / validate (pull_request) Failing after 2m18s
CI / molecule-tests (1) (pull_request) Skipped
CI / molecule-tests (2) (pull_request) Skipped
CI / molecule-tests (3) (pull_request) Skipped
CI / molecule-tests (4) (pull_request) Skipped
CI / molecule-tests (5) (pull_request) Skipped
CI / molecule-tests (6) (pull_request) Skipped
CI / auto-merge (pull_request) Skipped
c5e708153d
CI molecule tests were failing with two Docker daemon instability
patterns on the grm-managed runners:

1. Stuck container kill (infra job 30752): "500 Server Error: cannot
   kill container: tried to kill container, but did not receive an exit
   event" — container processes don't respond to SIGTERM within Docker's
   default grace period.

2. Simultaneous daemon unresponsiveness (infra run 3416): 5 of 6
   molecule jobs died at the same instant with "context deadline
   exceeded" on the Docker socket — all rootless daemons became
   unresponsive.

Root causes:
- daemon.json lacked resilience settings (no live-restore, no
  shutdown-timeout, no concurrency limits, no ulimits)
- Healthcheck ran every 5min and only checked `docker info` — too
  coarse, and `docker info` can hang indefinitely on a stuck daemon
- No stuck container detection or force-cleanup
- Prune service only ran daily and didn't clean stopped containers
  or networks

Fix:
- Add live-restore, shutdown-timeout (30s), max-concurrent-downloads/
  uploads (3), and default-ulimits (nofile 1M) to daemon.json
- Add timeout (10s) to healthcheck's `docker info` check
- Add stuck container detection (removing/stopping state) + force-cleanup
- Add container/network prune to healthcheck disk-space cleanup
- Add container/network/builder-cache prune to daily prune service
- Reduce healthcheck interval from 5min to 2min
- Update molecule template-content verify tests for new content

Closes GRM-156

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
emo changed title from fix: harden rootless Docker daemon resilience on CI runners (GRM-156) to GRM-156: Harden rootless Docker daemon resilience on CI runners 2026-08-05 13:36:59 +00:00
emil added 1 commit 2026-08-05 13:40:51 +00:00
chore: re-trigger CI with corrected PR title
CI / validate (pull_request) Successful in 1m11s
CI / molecule-tests (6) (pull_request) Successful in 4m13s
CI / molecule-tests (2) (pull_request) Successful in 4m37s
CI / molecule-tests (3) (pull_request) Successful in 4m44s
CI / molecule-tests (1) (pull_request) Successful in 5m4s
CI / molecule-tests (4) (pull_request) Successful in 5m48s
CI / molecule-tests (5) (pull_request) Successful in 7m25s
CI / auto-merge (pull_request) Successful in 1m4s
095e224f7b
emo reviewed 2026-08-05 13:41:59 +00:00
emo left a comment
Author
Owner

Automated PR Review

  • Architecture compliance: OK
  • Best practices: OK
  • Security: OK
  • i18n: OK
  • Resource management: OK
  • Documentation: WARNING — Ansible role changed but no docs updated
  • Tests: OK
  • Commit conventions: OK

No issues found by automated checks.


Auto-merge: If all CI checks pass, this PR will be merged automatically.

## Automated PR Review - Architecture compliance: OK - Best practices: OK - Security: OK - i18n: OK - Resource management: OK - Documentation: WARNING — Ansible role changed but no docs updated - Tests: OK - Commit conventions: OK No issues found by automated checks. --- **Auto-merge:** If all CI checks pass, this PR will be merged automatically.
emil approved these changes 2026-08-05 13:50:31 +00:00
emil left a comment
Owner

Auto-approved: all CI checks passed (validate, molecule-tests).

Auto-approved: all CI checks passed (validate, molecule-tests).
emo merged commit 185e41c49e into master 2026-08-05 13:50:37 +00:00
emo deleted branch GRM-156-docker-daemon-resilience 2026-08-05 13:50:38 +00:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: oblachno-oss/grm#239