← Back to Pull requests

OCPBUGS-99650: Delete stale auto-sizing MachineConfigs for non-default (custom) pools 4.20 #6335

Closed
unknown closed this pull request without merging on Jul 29, 2026 08:26 UTC
View on GitHub
unknown unknown commented on Jul 24, 2026 08:25 UTC
Author

Fixes: OCPBUGS-99650

<!--
If this is a bug fix, make sure your description includes "Fixes: #xxxx", or
"Closes: #xxxx"

Please provide the following information:
-->

- What I did

Fixed stale 50-{pool}-auto-sizing-disabled MachineConfigs persisting on non-default pools after upgrade from 4.20.24 or earlier. Restarting machine-config-controller creating 50-{pool}-auto-sizing-disabled MachineConfigs for custom pools.

OCPBUGS-83862 (shipped in 4.20.25) stopped creating auto-sizing MachineConfigs for non-default pools, but never cleaned up ones already created by older MCO versions. These stale MachineConfigs mask autoscaling configuration in KubeletConfigs for custom pool nodes.

Modified ensureAutoSizingMachineConfigs to iterate all MachineConfigPools on controller startup:
- Master/worker pools: create auto-sizing MC if missing (existing behavior)
- Non-default pools: delete the auto-sizing MC if it exists

- How to verify it

1. Launch a cluster on 4.20.24
2. oc apply -f mcp.yaml to add a custom MachineConfigPool
3. oc -n openshift-machine-config-operator delete pods -l k8s-app=machine-config-controller
4. Verify 50-custom-auto-sizing-disabled gets created
5. Upgrade to a version containing this fix
6. oc get machineconfigs | grep auto-sizing — only 50-master-auto-sizing-disabled and 50-worker-auto-sizing-disabled should remain

- Description for the changelog
<!--
Write a short (one line) summary that describes the changes in this
pull request for inclusion in the changelog:
-->
Delete stale auto-sizing-disabled MachineConfigs for non-default pools on controller startup to fix custom pool nodes affected after upgrade clusters.

Diff: 229 lines (+171 / -58) across 2 files Reviewer: aksjadha Review duration: 7201m
All Vouch review confidence checks passed
Residual risk 0.24 = Change Risk (0.60) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.60 · 229 lines diff across 2 files
0.60
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
60%
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.325
Shallow Review Depth shallow_review_depth
0.289
Sensitive Paths sensitive_paths
0.060
Real PR Conversation Timeline
1 comments
"Review active on #6335"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 60.5% 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: 60.2% (MEDIUM) · Higher = larger blast radius
60.2%
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: 60.5% · Lower = rushed or shallow review
60.5%
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: 23.8% · Safe to merge
23.8%