OCPBUGS-78745: OCPBUGS-78836: PR2774 and PR2793 backports [release-4.20]#470
Conversation
|
Important Review skippedAuto reviews are limited based on label configuration. 🚫 Review skipped — only excluded labels are configured. (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
|
@jacob-anders: This pull request references Jira Issue OCPBUGS-78745, 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. |
|
/jira refresh |
|
@jacob-anders: This pull request references Jira Issue OCPBUGS-78745, 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. |
|
/jira refresh |
|
@jacob-anders: This pull request references Jira Issue OCPBUGS-78745, 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. |
|
/jira refresh |
|
@jacob-anders: This pull request references Jira Issue OCPBUGS-78745, which is valid. 7 validation(s) were run on this bug
Requesting review from QA contact: 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. |
|
/verify later |
|
/lgtm |
|
Just to be sure, but do we really need Add namespaced mode to BMO controller ? it seems something quite new for us to backport downstream in 4.20 🤔 |
Virtual media BMC drivers (redfish-virtualmedia, idrac-virtualmedia, ilo5-virtualmedia) can boot from virtual media and discover the MAC address during hardware inspection. Therefore, bootMACAddress is optional when inspection is enabled but still required when inspection is disabled (since there's no other way to discover the MAC address). This change updates the virtual media driver implementations to return false from their NeedsMAC() methods, and adds validation logic to require bootMACAddress when virtual media is used with inspection disabled. Drivers that require PXE boot (like libvirt, ipmi) continue to require bootMACAddress in all cases. Changes: - pkg/hardwareutils/bmc/redfish_virtualmedia.go: NeedsMAC() returns false - pkg/hardwareutils/bmc/idrac_virtualmedia.go: NeedsMAC() returns false - internal/webhooks/metal3.io/v1alpha1/baremetalhost_validation.go: Add logic to require bootMACAddress for virtual media when inspection is disabled (via InspectionMode field or inspect.metal3.io annotation) - pkg/provisioner/ironic/ironic.go: Skip MAC-based port queries when bootMACAddress is empty to prevent false MAC conflicts Test Coverage: - internal/webhooks/metal3.io/v1alpha1/baremetalhost_validation_test.go: * bootMACAddress not required for virtual media with inspection enabled * bootMACAddress required for virtual media with inspection disabled * bootMACAddress valid when provided for virtual media with inspection disabled - pkg/hardwareutils/bmc/access_test.go: Update virtual media test expectations (needsMac: false) Assisted-By: Claude <noreply@anthropic.com> Signed-off-by: Don Penney <dpenney@redhat.com> (cherry picked from commit ae0f01e) (cherry picked from commit 50cf4f5)
Changes:
1. Restore case-insensitive MAC comparison using strings.EqualFold()
- The EqualFold check was removed inadvertently but is necessary for
case-insensitive bootMACAddress validation
2. Use existing host.InspectionDisabled() method
- Remove duplicate isInspectionDisabled() function
- Replace custom implementation with the existing BareMetalHost method
- The host.InspectionDisabled() method provides identical functionality
Assisted-by: Claude (AI Assistant)
Signed-off-by: Don Penney <dpenney@redhat.com>
(cherry picked from commit a827cd6)
(cherry picked from commit 2a03292)
Simplify the conditional logic for determining when a MAC address is required. The new approach uses a single boolean expression instead of separate assignment and conditional check, improving code readability while maintaining the same functionality. Assisted-by: Claude (AI Assistant) Signed-off-by: Don Penney <dpenney@redhat.com> (cherry picked from commit 90cf76e) (cherry picked from commit 5eaac85)
290f05a to
6553f52
Compare
|
@jacob-anders: This pull request references Jira Issue OCPBUGS-78745, which is valid. 7 validation(s) were run on this bug
Requesting review from QA contact: 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. |
Valid point, Iury. I comprehensively reviewed the change as discussed in the gMeet. I modified 59c4706 to apply without all the prerequisites (minor changes needed to test only). This makes the commit list very much like #469. Good pickup @iurygregory . PTAL. |
Cherry-picked commits 73162ee and 0bfae5f replaced the standalone isInspectionDisabled() helper with a call to host.InspectionDisabled(), a method introduced upstream by f098914 ("Introduce InspectionMode field"). That commit was not cherry-picked to release-4.20, so the method was missing and the build failed. Add a minimal InspectionDisabled() method that checks the annotation (the only mechanism available on 4.20), and fix tests to use the annotation instead of the non-existent InspectionMode field. Assisted-By: Claude Opus 4.6
Go 1.24 (introduced via the CAPI v1.11.0-alpha.0 bump in fba6e43) now validates IPv6 hosts during url.Parse, producing a different error message than the custom checkDNSValid validator that previously caught it. Update the test expectation to match. Assisted-By: Claude Opus 4.6
|
@jacob-anders: all tests passed! 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. |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dtantsur, jacob-anders 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 |
|
/verified later @jacob-anders |
|
@jacob-anders: This PR has been marked to be verified later 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. |
|
/lgtm |
4e38a27
into
openshift:release-4.20
|
@jacob-anders: Jira Issue OCPBUGS-78745: All pull requests linked via external trackers have merged: This pull request has 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. |
This is an attempt to backport
metal3-io#2793
and
metal3-io#2774
along with other commits required for the cherry-picks to apply cleanly