-
Notifications
You must be signed in to change notification settings - Fork 1.5k
OCPBUGS-62209: Fix zones from defaultMachinePlatform ignored when pla… #10087
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…tform config is set When users specify zones in platform.vsphere.defaultMachinePlatform.zones and also configure controlPlane.platform.vsphere or compute.platform.vsphere with CPU/memory settings, the zones from defaultMachinePlatform were being ignored and all nodes were landing in random zones based on their physical vCenter location. Root cause: The validation code in ValidateMachinePool was automatically populating zones with ALL failure domains when zones were empty. This happened BEFORE the Set() merging logic in master.go and worker.go, causing the zones from defaultMachinePlatform to be overwritten. Fix: Remove automatic zone population from validation code. Validation now only validates zones but does not populate them. Zone population happens during machine generation AFTER merging with defaultMachinePlatform, ensuring zones from defaultMachinePlatform are properly respected. Changes: - pkg/types/vsphere/validation/machinepool.go: Remove auto-population logic - pkg/types/vsphere/validation/machinepool_test.go: Update test expectations - pkg/types/vsphere/machinepool_test.go: Add tests for Set() method behavior 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
|
@jcpowermac: This pull request references Jira Issue OCPBUGS-62209, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. In 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. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/jira refresh |
|
@jcpowermac: This pull request references Jira Issue OCPBUGS-62209, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
Requesting review from QA contact: In 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. |
|
@jcpowermac: The following tests failed, say
Full PR test history. Your PR dashboard. 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 kubernetes-sigs/prow repository. I understand the commands that are listed here. |
| // are preserved when pool-specific platform config is set without zones. | ||
| // This reproduces the bug reported in OCPBUGS-62209. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❓ I think test cases in this file are testing the Set func, right?
| func (p *MachinePool) Set(required *MachinePool) { |
I am just unsure it is "truly" reproduce OCPBUGS-62209, where zones are defaulted in validation (where it should not be). I guess we can adjust the comments (golint is also failing here 😁)?
…tform config is set
When users specify zones in platform.vsphere.defaultMachinePlatform.zones and also configure controlPlane.platform.vsphere or compute.platform.vsphere with CPU/memory settings, the zones from defaultMachinePlatform were being ignored and all nodes were landing in random zones based on their physical vCenter location.
Root cause: The validation code in ValidateMachinePool was automatically populating zones with ALL failure domains when zones were empty. This happened BEFORE the Set() merging logic in master.go and worker.go, causing the zones from defaultMachinePlatform to be overwritten.
Fix: Remove automatic zone population from validation code. Validation now only validates zones but does not populate them. Zone population happens during machine generation AFTER merging with defaultMachinePlatform, ensuring zones from defaultMachinePlatform are properly respected.
Changes:
🤖 Generated with Claude Code