← Back to Pull requests

OCPBUGS-83862: Generate autosizing-disabled machineconfig only for master and worker nodes on OCP 4.20 #5885

Closed
unknown closed this pull request without merging on Jun 02, 2026 20:42 UTC
View on GitHub
unknown unknown commented on Apr 27, 2026 10:28 UTC
Author

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

Please provide the following information:
-->

- What I did

  • PR #5387 (https://github.com/openshift/machine-config-operator/pull/5387) introduced the 50-<mcp_name>-autosizing-disabled MachineConfig to disable node autosizing during the upgrade to 4.20. However, it generated this MachineConfig for all MachineConfigPools, including custom pools.
  • - Due to the change in MachineConfigPool precedence rules (RFE-1916 (https://issues.redhat.com/browse/RFE-1916)), the 50-<custom-mcp-name>-autosizing-disabled MachineConfig takes higher priority over the MachineConfig generated via KubeletConfig. This means that if a user had explicitly enabled autosizing through a KubeletConfig (as per the documentation), the newly generated MachineConfig would silently override that configuration and disable autosizing on custom pool nodes after the upgrade.

    - This PR restricts the 50-<mcp_name>-autosizing-disabled MachineConfig generation to only the master and worker pools, preventing custom pool autosizing configurations from being unintentionally overridden. This behavior will be retained when upgrading to 4.21.

    Summary of changes

  • Default autosizing behavior: PR #5387 (https://github.com/openshift/machine-config-operator/pull/5387) generates 50-<mcp_name>-autosizing-disabled MachineConfigs to ensure clusters created on 4.20 retain the pre-4.21 default behavior of having node autosizing disabled.

  • Upgrade prerequisite: This patch is a mandatory requirement for upgrading 4.20 clusters to 4.21. Cincinnati changes (cincinnati-graph-data#9494 (https://github.com/openshift/cincinnati-graph-data/pull/9494)) will enforce that this patch is present before the 4.21 upgrade path is offered.

  • MachineConfig precedence conflict on custom pools: With the change in MachineConfigPool precedence rules (RFE-1916 (https://issues.redhat.com/browse/RFE-1916)), the 50-<custom-mcp-name>-autosizing-disabled MachineConfig takes higher priority than the MachineConfig generated from a user's KubeletConfig. This means if a user had explicitly enabled autosizing via KubeletConfig on a custom pool, the newly generated MachineConfig would silently override that configuration and disable autosizing after the upgrade. To prevent this, this PR restricts the autosizing-disabled MachineConfig generation to master and worker pools only, preserving user-configured autosizing on custom pools. This behavior will be retained when upgrading to 4.21
  • - How to verify it

  • Enable autosizing on 4.20 previous cluster, upgrade cluster to 4.20. Verify new MC generated only for master and worker mcp.

  • Debug to node check /etc/node-sizing-enabled.env file on custom pool nodes if change has reverted or not.
  • - Description for the changelog
    <!--
    Write a short (one line) summary that describes the changes in this
    pull request for inclusion in the changelog:
    -->

  • Restrict autosizing-disabled MachineConfig generation to master and worker pools only, preventing custom pool autosizing configurations set via KubeletConfig from being unintentionally overridden due to MachineConfig precedence rules.
  • <!-- This is an auto-generated comment: release notes by coderabbit.ai -->

    Summary by CodeRabbit

    Release Notes

    Bug Fixes
    Auto-sizing configuration now applies exclusively to default node pools (master and worker). Custom node pools are excluded from automatic sizing adjustments.

    Tests
    Updated test coverage to validate that auto-sizing applies only to default pools and that custom pools are properly skipped.

    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 490 lines (+367 / -123) across 6 files Reviewer: sairameshv Review duration: 52454m
    All Vouch review confidence checks passed
    Residual risk 0.28 = Change Risk (0.71) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.71 · 490 lines diff across 6 files
    0.71
    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.371
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.071
    Real PR Conversation Timeline
    1 comments
    "Review active on #5885"
    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: 70.6% (HIGH) · Higher = larger blast radius
    70.6%
    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: 27.9% · Safe to merge
    27.9%