OCPBUGS-83862: Generate autosizing-disabled machineconfig only for master and worker nodes on OCP 4.20#5885
Conversation
…ster and worker nodes on OCP 4.20
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (3)
WalkthroughThe PR restricts auto-sizing MachineConfig generation to only the default master and worker pools. The implementation now explicitly iterates over these pool names instead of listing all available pools; non-default pools are skipped with logging during bootstrap. Tests are updated to validate this narrowed scope. ChangesRestrict auto-sizing MachineConfigs to default pools
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 12✅ Passed checks (12 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (2.12.2)Error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Hi @aksjadha. Thanks for your PR. I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
@aksjadha: This pull request references Jira Issue OCPBUGS-83862, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
ngopalak-redhat
left a comment
There was a problem hiding this comment.
Can you update the description explaining why this change is made and what it fixes?
| // RunAutoSizingBootstrap generates auto-sizing MachineConfig objects for master and worker mcpPools | ||
| func RunAutoSizingBootstrap(mcpPools []*mcfgv1.MachineConfigPool) ([]*mcfgv1.MachineConfig, error) { | ||
| configs := make([]*mcfgv1.MachineConfig, 0, len(mcpPools)) | ||
| var configs []*mcfgv1.MachineConfig |
There was a problem hiding this comment.
Why is this changed?
There was a problem hiding this comment.
The change from make([]*mcfgv1.MachineConfig, 0, len(mcpPools)) to var configs []*mcfgv1.MachineConfig was made because the pre-allocated capacity is no longer accurate.
- Before: Every pool produced a config, so len(mcpPools) was the exact capacity needed.
- After: This change skips non-master/non-worker pools, so the actual number of configs will be less than or equal to len(mcpPools). Pre-allocating len(mcpPools) slots would over-allocate for any custom pools passed in.
The optimization of pre-allocating capacity is not required. A simple var configs []*mcfgv1.MachineConfig (nil slice, grown via append) avoids implying the slice.
|
/ok-to-test |
|
/assign @sairameshv |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
/jira refresh |
|
@ngopalak-redhat: This pull request references Jira Issue OCPBUGS-83862, which is invalid:
Comment DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
@aksjadha: This pull request references Jira Issue OCPBUGS-83862, which is valid. The bug has been moved to the POST state. 7 validation(s) were run on this bug
DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
@aksjadha: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
sairameshv
left a comment
There was a problem hiding this comment.
/lgtm
Changes look good to me
|
Tests from second stage were triggered manually. Pipeline can be controlled only manually, until HEAD changes. Use command to trigger second stage. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aksjadha, isabella-janssen, sairameshv The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Test result: On 4.20 cluster, only below 2 mc generated, not custom one. Kubeletconfig created to enable autosizing on worker and custom pool nodes. With 50-mcp-autosizing-disabled mc, changes were not reverting on custom pool nodes. |
|
/verified |
|
@aksjadha: The DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
/verified by @aksjadha Verified the changes through manual testing and have added the test results above. |
|
@aksjadha: Jira verification commands are restricted to collaborators for this repo. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
@sairameshv: This PR has been marked as verified by DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
/label backport-risk-assessed |
|
/test e2e-aws-ovn-upgrade |
a271df1
into
openshift:release-4.20
|
@aksjadha: Jira Issue Verification Checks: Jira Issue OCPBUGS-83862 Jira Issue OCPBUGS-83862 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓 DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
Fix included in release 4.20.0-0.nightly-2026-06-02-232813 |
Fixes: OCPBUGS-83862
- What I did
PR [release-4.20] OCPBUGS-65777: Enforce OCP 4.20 and earlier cluster to have AutoSizingReserved disabled by default #5387 ([release-4.20] OCPBUGS-65777: Enforce OCP 4.20 and earlier cluster to have AutoSizingReserved disabled by default #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--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
- How to verify it
- Description for the changelog
Summary by CodeRabbit
Release Notes
Bug Fixes
Tests