Skip to content

Dev Pusher deploy lane has been red for 4 days: live capacity gate cannot pass on an autoscaling 1-node pool #11245

Closed

Description

@kodjima33

Auto Deploy Backend Pusher to GKE (Development) has failed on every push to main since 2026-08-05 15:20 UTC (30+ consecutive runs; latest run 31251722854 on 0afc7b9c79). It always dies at the same step, before any Helm mutation:

FAIL: insufficient schedulable Pusher headroom for the next surge wave:
      need 700m CPU and 2147483648 bytes memory for 1 surge pod(s)

Consequence: the dev Pusher has not been deployed for 4+ days. dev-omi-pusher-8649b95594-wn66w is 4d4h old on pusher@sha256:b69c2d75… (revision 210), while CI has been building sha256:46128d7b…. Dev is not qualifying the code that prod promotion is selected from.

This is not a capacity shortage — the gate cannot pass on this topology

backend/scripts/verify_pusher_live_deployment_gate.py (capacity_evidence → node_matches_pod) only counts currently Ready, schedulable nodes. It has no model of the cluster autoscaler. Measured live against dev-omi-gke just now (same code path as CI, same digest):

value
candidate nodes (match service=pusher,env=dev + dedicated=pusher toleration) 1 — gke-dev-omi-gke-pusher-pool-a7e64326-1zht
node allocatable 1930m CPU / 5535Mi
already requested on it 1424m CPU / 3530Mi (700m/2Gi = the live Pusher pod, rest kube-system daemons)
free 506m CPU / 2005Mi
needed for 1 surge pod 700m CPU / 2048Mi

But pusher-pool is an autoscaling pool, min 1 / max 10 (gcloud container node-pools list --cluster dev-omi-gke). The autoscaler would provision the node the surge pod needs — it never gets the chance, because the gate fails before Helm runs, so no Pending pod is ever created for it to react to. Deadlock.

And on n1-standard-2 (1930m allocatable) this can never resolve itself while the pool sits at one node: 700m live pod + ~724m daemons leaves under 700m, with maxUnavailable: 0, maxSurge: 1 (backend/charts/pusher/dev_omi_pusher_values.yaml:374-377) requiring a second pod before the first goes away. Every green run before 08-05 was luck about how much of that node the daemons happened to hold.

The workflow has no workflow_dispatch and no break-glass input, so there is no hatch — contra root AGENTS.md ("Every gated surface has a break-glass hatch").

Why the obvious workaround doesn't work

Setting dev to maxUnavailable: 1, maxSurge: 0 (a 1-replica dev service can tolerate a moment of downtime) trips a different hard failure — surge_count rejects it outright:

if surge < 1:
    raise GateError("rendered Pusher maxSurge must provide at least one surge pod")

verify_pusher_live_deployment_gate.py:260-261

So the gate mandates surge-based rollout and simultaneously refuses to believe the surge node can be created. Any real fix has to touch the gate.

Proposed fix (needs a backend/deploy owner — has prod blast radius)

The same script gates the prod lane (gcp_backend_pusher.yml) as well as dev (gcp_backend_pusher_auto_deploy.yml), so this should not be patched casually. Options, cheapest first:

  1. Make the gate autoscaler-aware. When no Ready node fits, read the pool's autoscaling.maxNodeCount vs current node count for the pools whose labels/taints match the pod spec; if the pool can still grow and one empty node of that machine type would fit the surge pod (allocatable minus DaemonSet requests ≥ request), pass with evidence naming the pool and the headroom it will come from. Keep failing closed when the pool is already at max, or when even a fresh node is too small — which is the case the gate was actually written for.
  2. Allow surge-free rollout where the values ask for it. Drop the surge < 1 hard error; when maxSurge: 0 and maxUnavailable ≥ 1, verify the replacement pod fits after the old one is evicted (i.e. on the node the old pod is leaving) instead of demanding simultaneous headroom. Then dev can set maxSurge: 0.
  3. Add the missing break-glass (workflow_dispatch + skip_capacity_gate / reason), per the AGENTS.md hatch rule, so a broken gate stops meaning a stuck lane.
  4. Ops stopgap only: raise pusher-pool min to 2 or move dev Pusher to a larger machine type. This unblocks today but the autoscaler will scale back down to 1 when idle and the lane re-breaks — it is not a fix.

Option 1 + 3 together is the durable shape: the gate keeps its fail-closed purpose for genuinely unschedulable pods, and stops treating "the autoscaler has not been asked yet" as "no capacity exists."

Reproduce locally

python3 backend/scripts/verify_pusher_live_deployment_gate.py \
  --environment dev --namespace dev-omi-backend \
  --image gcr.io/based-hardware-dev/pusher@sha256:46128d7b1a8c36045b3aad14ee493e5f2b1ba2656881650fc8256d2762fb575a
# FAIL: insufficient schedulable Pusher headroom ... (identical to CI)

Filed rather than fixed: the fix relaxes a fail-closed deployment gate shared with the prod Pusher lane, which wants an owner's sign-off, and it cannot be end-to-end verified without running a real dev deploy. Prior triage passes have repeatedly written this red off as "dev GKE capacity / infra" — the min 1 / max 10 autoscaling config above is the evidence that it is not.

Activity

  1. kodjima33 commented on Aug 8, 2026

    @kodjima33
    CollaboratorAuthor

    Same root cause just took down a second lane: Auto Deploy Backend to Development failed on d382cd5 at 13:04Z (run 31258039027) — first failure of that lane today (12:29Z, 11:27Z, 10:47Z, 09:59Z all green).

    Failing step is the pre-promotion LLM-gateway smoke:

    kubectl -n dev-omi-backend run llm-gateway-smoke-31258039027 --rm -i --restart=Never --image gcr.io/based-hardware-dev/llm-gateway:d382cd5 ...
    error: timed out waiting for the condition        # after 61s
    pod "llm-gateway-smoke-31258039027" deleted from dev-omi-backend namespace
    

    It is not the gateway image — the pod never got scheduled. Live evidence from dev-omi-gke just now:

    $ kubectl get events -A --field-selector reason=FailedScheduling
    dev-omi-backend  15m  Warning  FailedScheduling  pod/dev-omi-backend-listen-6f95679487-2l5ws
      0/9 nodes are available: 1 Insufficient cpu, 3 node(s) didn't match Pod's node affinity/selector,
      5 node(s) had untolerated taint(s). ... preemption: 0/9 nodes are available
    

    The smoke pod is a bare kubectl run with no nodeSelector and no tolerations, so the only node it can land on is the single untainted monitoring-pool node, which is saturated:

    gke-dev-omi-gke-monitoring-pool-e2abd930-n36n
      cpu     1889m (97%)
      memory  13108962560 (94%)
    

    default-pool has autoscaling enabled but no minNodeCount and currently zero nodes, so nothing absorbs the burst; the 60s kubectl run wait is shorter than a node scale-up, so the step fails deterministically whenever the cluster is at this level of pressure.

    Suggested ops fix (no code change needed to unblock): set default-pool --min-nodes=1 on dev-omi-gke, or give the smoke pod a toleration/nodeSelector for an existing pool. A code fix would have to raise the smoke step's wait past node-scale-up time, but that lives in .github/workflows/, so flagging rather than patching.

    🤖 hourly watchdog — evidence only, no PR opened.

  2. moved this from Someday to In progress in omi TODO / bountieson Aug 30, 2026
  3. moved this from In progress to In review in omi TODO / bountieson Aug 30, 2026
  4. added a commit that references this issue on Aug 30, 2026
    6134ebd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions