WIP: jenkins: rank the controller above its own build agents #49
Draft
hermes-automation
wants to merge 1 commits from
fix/t_39cf1905-jenkins-controller-priority into main
pull from: fix/t_39cf1905-jenkins-controller-priority
merge into: titan:main
titan:main
titan:feature/hermes-agent-build-mirrors
titan:feature/hermes-agent-multiarch
titan:feature/hermes-next-hux
titan:feature/hermes-hux-contracts
titan:feature/t_39cf1905-webui-build-token
titan:feature/t_26da4c88-titan-capacity-guardrails-v4
titan:feature/t_26da4c88-titan-capacity-guardrails-v3
titan:feature/t_26da4c88-titan-capacity-guardrails-v2
titan:feature/t_26da4c88-titan-capacity-guardrails
titan:feature/t_8cbe6a55-hermes-webui-release-v2
titan:feature/t_8cbe6a55-hermes-webui-release
titan:feature/hermes-domain-rename-agent-worker-v2
titan:hermes/t_65356568-multiuser-capacity-assessment
titan:fix/cli-auto-failover-effort
titan:feature/hermes-pr44-after-pr43
titan:fix/hermes-heartbeat-dead-reclaim-replacement
titan:handoff/t_1a2c627b
titan:feature/hermes-combined-multilingual-voice-v2
titan:fix/hermes-handsfree-stt-webm
titan:fix/hermes-restore-legacy-chat-triage-hosts-v2
titan:feature/hermes-domain-rename-agent-worker-bstein
titan:fix/hermes-restore-legacy-chat-triage-hosts-v3
titan:hermes/tts-voice-multilingual-prerequisite
titan:fix/hermes-restore-legacy-chat-triage-hosts
titan:fix/hermes-oidc-ensure-rerun-hostname-rollout
titan:feature/hermes-direct-cli-lane-concurrency-2-replacement
titan:feature/hermes-domain-rename-chat-bstein-triage
titan:feature/hermes-kanban-profile-concurrency-2
titan:feature/hermes-zombie-lane-heartbeat-reclaim
titan:hermes/repair-pr26-voice-split
titan:feature/hermes-durable-two-worker-cli-concurrency
titan:hermes/chat-voice-conversation-instrument
titan:feature/hermes-domain-rename-chat-triage
titan:hermes/voice-stt-tts-language-routing
titan:hermes/voice-stt-language-routing
titan:hermes/tts-voice-multilingual
titan:fix/hermes-chat-session-continuity-contract
titan:hermes/tts-voice-hfc-female
titan:hermes/fix-grafana-no-data-vm-storage
titan:feature/ci-gitops
titan:fix/jenkins-quality-gate-discovery
titan:feature/hermes-inpod-supervisor
titan:feature/hermes-chat-smoothness
titan:wt/t_1e95ea6d
titan:feature/hermes-full-handoff-acceptance
titan:feature/hermes-distributed-worker-pool
titan:feature/hermes-review-goal-semantics
titan:feature/hermes-cli-auto-quota-routing
titan:fix/hermes-result-decomposition-reliability
titan:feature/hermes-safe-gitea-pr-client
titan:feature/hermes-unprivileged-image-builder
titan:feature/hermes-cli-process-reaping
titan:feature/hermes-three-lane-placement
titan:wt/t_cca008de
titan:codex/cassandra-generator-08105
titan:cassandra-0851-rollout
titan:cassandra-0821-deploy
titan:codex/testing-dashboard-health-20260604
titan:feature/ariadne
titan:feature/pi-usb-scratch-rollout
titan:feature/sso-hardening
titan:codex/titan-iac-work-quality-gate
titan:codex/titan-iac-main-platform-metrics
titan:codex/titan-iac-platform-metrics
titan:feature/atlas-jobs-schedule-observability
titan:lane2/jenkins-cleanup-activate
titan:lane2/jenkins-cleanup-wiring-split
titan:codex-ananke-fixes
titan:feature/atlasbot-ananke-recovery
titan:feature/atlasbot
titan:deploy
titan:feature/vault-consumption
titan:feature/postgres-migration
titan:feature/bstein-dev-home
titan:feature/mailu
titan:feature/sso
titan:feature/atlas-monitoring
titan:restructure/hybrid-clusters
titan:fea/titan24-gpu
1 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
f997171b55 |
jenkins: rank the controller above its own build agents
The Jenkins controller and the ephemeral build agents it schedules both ran at priority 0. Because the controller Deployment uses the Recreate strategy, any JCasC change tears the controller down before its replacement is scheduled, and while the eligible node pool is saturated that freed slot can be taken by one of the controller's own pending agents. That is what happened on 2026-08-23. Merging #48 changed services/jenkins/configmap-jcasc.yaml, which rolled the hashed jenkins-jcasc-revision ConfigMap and so rolled the Deployment. At 12:19:57Z the old controller pod was deleted; at 12:19:59Z the build agent typhon-133-1pmgb, pending since 11:42:15Z, took the freed capacity on titan-11, and the new controller pod has been Pending ever since. The scheduler cannot resolve it because every candidate victim is also priority 0: "No preemption victims found for incoming pod". The agent cannot exit on its own either, since its jnlp container just loops on "Connection refused" against the controller that cannot start. It is a self-deadlock, not a transient capacity dip. Give the controller a jenkins-core class (500) so it outranks its agents and can preempt one when it has nowhere else to go, and mark the JCasC default agent template jenkins-agent (50, preemptionPolicy: Never) so agents never preempt anything themselves. Values follow the existing *-core/*-sim classes. The controller-side class is what breaks the deadlock: agents declared inline by a Jenkinsfile podTemplate, like typhon-133, do not inherit the JCasC default template, so only the controller's own priority covers every agent. PriorityClasses ship in infrastructure/modules/base via the core Kustomization, so jenkins now dependsOn core, matching cassandra and veles. Verified no dependency cycle: core itself has no dependsOn. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |