test(e2e): harden rootful Podman shards against daemon stalls - #1247
Conversation
Signed-off-by: Samuel K <skevetter@pm.me>
Signed-off-by: Samuel K <skevetter@pm.me>
Signed-off-by: Samuel K <skevetter@pm.me>
Signed-off-by: Samuel K <skevetter@pm.me>
Signed-off-by: Samuel K <skevetter@pm.me>
Signed-off-by: Samuel K <skevetter@pm.me>
Signed-off-by: Samuel K <skevetter@pm.me>
Signed-off-by: Samuel K <skevetter@pm.me>
Signed-off-by: Samuel K <skevetter@pm.me>
Signed-off-by: Samuel K <skevetter@pm.me>
Signed-off-by: Samuel K <skevetter@pm.me>
Signed-off-by: Samuel K <skevetter@pm.me>
✅ Deploy Preview for images-devsy-sh canceled.
|
|
Warning Review limit reachedNext included review available in 52 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (10)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
✅ Deploy Preview for devsydev canceled.
|
Signed-off-by: Samuel K <skevetter@pm.me>
Signed-off-by: Samuel K <skevetter@pm.me>
Signed-off-by: Samuel K <skevetter@pm.me>
|
@greptileai review |
|
| if recErr := attemptPodmanRecovery(recoveryCtx, wrapperPath); recErr != nil { | ||
| ginkgo.GinkgoWriter.Printf("[podman-recovery] cleanup recovery failed: %v\n", recErr) | ||
| return cleanupErr | ||
| } |
There was a problem hiding this comment.
If the daemon wedges after setup and cleanup recovery fails, this branch returns the cleanup error without marking rootfulDaemonGate unhealthy. The following spec therefore proceeds into setupRootfulPodman and fails against the same unhealthy daemon before the gate is finally marked, producing the cascading infrastructure failure this change is intended to prevent. Mark the gate when cleanup-time daemon recovery fails, as the setup-time recovery path already does.
| if recErr := attemptPodmanRecovery(recoveryCtx, wrapperPath); recErr != nil { | |
| ginkgo.GinkgoWriter.Printf("[podman-recovery] cleanup recovery failed: %v\n", recErr) | |
| return cleanupErr | |
| } | |
| if recErr := attemptPodmanRecovery(recoveryCtx, wrapperPath); recErr != nil { | |
| rootfulDaemonGate.markUnhealthy(ginkgo.CurrentSpecReport().FullText()) | |
| ginkgo.GinkgoWriter.Printf("[podman-recovery] cleanup recovery failed: %v\n", recErr) | |
| return cleanupErr | |
| } |
Summary
Two consecutive main-branch runs failed in the rootful Podman E2E shards after green PR runs (https://github.com/devsy-org/devsy/actions/runs/35485053108, https://github.com/devsy-org/devsy/actions/runs/35485741862): one wedged daemon stalled cleanup and turned into five cascading
BeforeEachhealth-check failures, and a lifecycle spec hung until Go's 10-minute suite timeout. This PR hardens the harness against that failure shape without masking product regressions.e2e/tests/up/podman_rootful.go(new): shared rootful setup with a classified health check (timeout = wedged, socket errors = unavailable, anything else = responsive-but-erroring), bounded per-command daemon diagnostics (podman version/info/ps,systemctl status, boundedjournalctl, process list, disk, memory), a single boundedsystemctl restartrecovery for the wedged/unavailable classes only, and a shard gate that skips remaining specs after the first unrecoverable daemon failure instead of cascading.setupRootfulPodmaninstead of duplicating wrapper setup.e2e/tests/up/helper.go: failed workspace cleanup on rootful shards now collects diagnostics, classifies daemon state, and performs one restart plus one cleanup retry only when the daemon is wedged or missing. A responsive-but-erroring daemon fails without retry, so product bugs are not hidden.e2e/framework/exec.go:WaitDelayon framework command execution so a grandchild that survives the process-group kill while holding stdout/stderr pipes cannot blockWaitpast the spec timeout.hack/ci/setup-podman-linux.sh: systemd drop-in keeps the rootful API service resident (system service --time=0) for the whole shard instead of the stock 5s idle exit, removing socket-reactivation churn between test commands.What this deliberately does not do
Verification
gofmtclean;go build ./e2e/...passes;go test ./e2e/tests/up/ ./e2e/framework/passes locally.