fix: complete pod survival across restarts (KillMode + degraded-survivor adoption)#67
Merged
Merged
Conversation
…pod conmons (refs #53) podman run from spark.service places conmon and container processes in the service cgroup. With the default KillMode=control-group, systemctl stop waits for them, times out after 90s on every restart, and SIGKILLs the conmons — degrading the very pods the no-drain shutdown preserved. Signal only the spark process; TimeoutStopSec=30 keeps a clean bound.
…ing (refs #53) Live verification caught a surviving pod sitting in podman state Degraded at startup (its infra conmon was killed during the restart) while the workload container ran on. RecoverPods gated quota adoption on the pod-level Running flag, so the survivor kept serving with no ledger entry. Adoption now keys on presence in podman; if the pod is genuinely dead the next reconcile tick releases the quota through the normal per-container status path.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Live verification of #53's fix on v1.16.0 showed containers survive the restart, but two gaps remained:
podman runfrom spark.service puts conmon + containers in the service cgroup; defaultKillMode=control-groupmade every stop hang 90s waiting for them, then SIGKILL the conmons (observed:State 'final-sigterm' timed out. Killing process ... (conmon)), leaving surviving podsDegraded.RecoverPodsgated adoption on pod-levelRunning; a Degraded survivor (dead infra conmon, live workload) kept serving with an empty ledger entry — silent overcommit again.Fix
deploy/spark.service:KillMode=process+TimeoutStopSec=30— stop signals only the spark binary; pods and their conmons are untouched, stops are instant.RecoverPods: adopt store-Running pods on presence in podman; a genuinely dead pod loses the quota one reconcile tick later via the per-container status path.Testing
TestRecoverPods_DegradedSurvivorStillReclaimsQuota(new) + existing recovery/adoption tests.-racegreen, vet + staticcheck clean.Live acceptance after deploy:
systemctl restart spark.servicewith a running pod must return in seconds (no 90s hang), pod keeps its container ID with conmon intact, podman state staysRunning, and/api/v1/resourcesshows the allocation re-registered.Refs #53