Skip to content

CI: Prevent/kill Jenkins k8s agent orphans and unschedulable agent pods - #5024

Open
michaelsembwever wants to merge 2 commits into
apache:cassandra-5.0from
thelastpickle:mck/fix_ci_gha/5.0
Open

CI: Prevent/kill Jenkins k8s agent orphans and unschedulable agent pods#5024
michaelsembwever wants to merge 2 commits into
apache:cassandra-5.0from
thelastpickle:mck/fix_ci_gha/5.0

Conversation

@michaelsembwever

@michaelsembwever michaelsembwever commented Aug 14, 2026

Copy link
Copy Markdown
Member

node pools can get stuck at max desired size, wasting a lot of resources and $$$
Either the instanceCap goes beyond the node group sizes, and it thrashes, or (for example) the controller fails its liveness probe, gets SIGKILLed, then orphans agent pods forever. Manually trying to scale down the node groups won't help the as the jenkins keeps trying to scale up again…

jenkins-deployment.yaml:

  • enable agent.garbageCollection, so a controller restart no longer leaks agent pods; activeDeadlineSeconds cannot tell an orphan from a legitimate 6h microbench build
  • cap agent-dind-large at the 160 nodes its pool holds. At 200 the surplus pods could never be scheduled, so they churned and drove both large node groups to maxSize
  • loosen the controller probes, so a stall no longer takes every running build with it
  • log gc and safepoints to the PVC, to make the next stall attributable

run-ci:

  • refuse to deploy an instanceCap above what the node pools can schedule, read from the cluster-autoscaler status configmap
  • fail rather than fall back to origin when a branch tracks no remote, since origin carries no dev branches; suggest push.autoSetupRemote
  • helm --timeout 10m, as --wait's 5m default is now shorter than the startupProbe's boot budget

jenkins-check.yaml

  • fix helm installation

patch by Mick Semb Wever; reviewed by TODO for CASSANDRA-21576

Assisted-by: Claude Code:claude-opus-5

The controller failed its liveness probe and was SIGKILLed, orphaning fifteen agent pods for 40h.  Each reconnected every 10s to be refused, and each pinned a whole node against scale-down.

  jenkins-deployment.yaml:
   - enable agent.garbageCollection, so a controller restart no longer leaks agent pods; activeDeadlineSeconds cannot tell an orphan from a legitimate 6h microbench build
   - cap agent-dind-large at the 160 nodes its pool holds.  At 200 the surplus pods could never be scheduled, so they churned and drove both large node groups to maxSize
   - loosen the controller probes, so a stall no longer takes every running build with it
   - log gc and safepoints to the PVC, to make the next stall attributable

  run-ci:
   - refuse to deploy an instanceCap above what the node pools can schedule, read from the cluster-autoscaler status configmap
   - fail rather than fall back to origin when a branch tracks no remote, since origin carries no dev branches; suggest push.autoSetupRemote
   - helm --timeout 10m, as --wait's 5m default is now shorter than the startupProbe's boot budget

  jenkins-check.yaml
   - fix helm installation

  patch by Mick Semb Wever; reviewed by TODO for CASSANDRA-TODO

Assisted-by: Claude Code:claude-opus-5
Comment thread .build/run-ci Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants