← Back to Pull requests

fix(infra): give kubelet-ds rollout room on fresh management clusters (ARO-30377) #7843

Open
unknown opened this pull request with 602 lines diff across 7 files
View on GitHub
unknown unknown commented on Oct 29, 2026 17:30 UTC
Author

ARO-30377

Supersedes #7839

The runner budget/off-by-one work is folded into this PR rather than split out into a separate change.

What

Bump the kubelet-ds Helm step's rollout budget from the default 5m to 15m (the same budget the mitigations step already uses for this class of first-install slowness), and add the Helm rollout-wait error (not ready. status:) to the step's automatedRetry patterns so a rollout that misses the deadline is retried (upgrade + wait again) instead of failing the provision run.

Also fix the local pipeline runner (tooling/templatize) so that budget is actually honored across retries: the runner's outer step context capped the entire step — all attempts and backoffs — at 30 minutes, and only Istio steps' timeout was visible to it. The per-attempt context is now max(declared timeout, 30m); the 30m floor preserves the previous allowance, which matters because Helm grants the timeout to the rollout wait and to every hook separately. The outer budget now scales for every step with automatedRetry: attempt × maximumRetryCount + backoff × (maximumRetryCount − 1). That also widens steps without a declared timeout when retries are configured — e.g. kusto-grant-ingest (7 attempts × 30m + 6 × 1m) goes from a 30m cap to a 216m ceiling — so a genuinely hung attempt can take correspondingly longer to be detected. The runner also no longer backs off after the final permitted attempt, which is what makes the maximumRetryCount − 1 backoff term exact.

Why

On freshly provisioned (CI/DEV) management clusters the first kubelet-ds release races worker-node bring-up. Straggler pods can still be Pending when the default 5m Helm deadline expires:

resource DaemonSet/kube-system/set-kubelet-parameters-for-scale not ready.
status: InProgress, message: Available: 14/15 context deadline exceeded

(7 of 578 DEV e2e runs in 2026-10-08..15, plus occurrences back to 2026-09-16 with 0/18, 0/15, 11/15, 13/15.) The rollout typically completes a few minutes past the deadline — the run fails on a wait, not on a defect.

The straggler root cause — the DaemonSet's unpinned docker.io alpine image hitting per-IP pull throttling on shared CI egress — is fixed by #6009 (digest-pinned mcr.microsoft.com/aks/command/runtime). This PR is the pipeline-side complement: it absorbs residual bring-up slowness (late node join, image-pull backoff, kubelet restarts at first install) so a recovering straggler no longer fails the provision step.

Without the runner fix, the retry configuration is not realizable: with a 15m Helm wait, the second attempt would be cancelled when the outer 30-minute budget expires, and the third attempt would never start (maximumRetryCount: 3 needs ~92m of budget under the 30m per-attempt floor).

Testing

  • Unit tests: [x] go test ./tooling/templatize/pkg/pipeline/... — green, including new TestStepAttemptTimeout/TestStepOuterTimeout covering the kubelet-ds shape (15m × 3 attempts + 1m backoffs) and TestExecuteNodeDoesNotWaitAfterFinalAttempt covering the final-backoff off-by-one (mutation-checked: removing the fix makes the test fail with context canceled replacing the step error); go test ./tooling/helmtest/... — green; make lint — 0 issues

  • Integration tests: [ ] not applicable (no service code changed)

  • E2E tests: [ ] e2e-parallel exercises the step on live management clusters — observed via post-merge DEV e2e flake rate
  • Special notes for your reviewer

    Retry semantics verified in the deployer (Azure/ARO-Tools tools/helm): the default rollout-wait timeout is 5m, and a step re-run finds the existing release history and takes the upgrade path with the full timeout again.

    The runner's outer budget now scales with the configured retry count for any step, whether or not it declares its own timeout. Steps that succeed quickly are unaffected in practice, but their worst-case failure-detection time grows with maximumRetryCount × 30m; for the widest current case (kusto-grant-ingest, 7 attempts) that is 216m instead of 30m.

    PR Checklist

  • PR is scoped to a single task (no mixed concerns)

  • Title follows Conventional Commits format

  • Summary explains the "Why" behind the change

  • Linked to relevant ticket/issue

  • Screenshots included (if dashboards or other UI changes) — N/A

  • Self-reviewed the diff

  • CI/CD checks are passing (ignore Tide)

  • Draft PR used for WIP (if applicable)

  • Commit history is clean (rebased/squashed)

  • Tricky code blocks are commented

  • Specific reviewers tagged

  • All comment threads resolved before merge
  • 🤖 Generated with Claude Code

    Diff: 602 lines (+451 / -151) across 7 files Reviewer: geoberle Review duration: 46798m
    All Vouch review confidence checks passed
    Residual risk 0.44 = Change Risk (0.80) × (1 − Review Confidence (0.45)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.80 · 602 lines diff across 7 files
    0.80
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    44%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.383
    Shallow Review Depth shallow_review_depth
    0.344
    Sensitive Paths sensitive_paths
    0.080
    Real PR Conversation Timeline
    1 comments
    "Review active on #7843"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: medium confidence: 44.7% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 80.3% (HIGH) · Higher = larger blast radius
    80.3%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 44.7% · Lower = rushed or shallow review
    44.7%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 44.4% · Moderate risk
    44.4%
    Repository