Skip to content

OCPBUGS-78745: OCPBUGS-78836: PR2774 and PR2793 backports [release-4.20]#470

Merged
openshift-merge-bot[bot] merged 7 commits intoopenshift:release-4.20from
jacob-anders:pr-2774-2793-4.20-backports
Apr 1, 2026
Merged

OCPBUGS-78745: OCPBUGS-78836: PR2774 and PR2793 backports [release-4.20]#470
openshift-merge-bot[bot] merged 7 commits intoopenshift:release-4.20from
jacob-anders:pr-2774-2793-4.20-backports

Conversation

@jacob-anders
Copy link
Copy Markdown

@jacob-anders jacob-anders commented Mar 17, 2026

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

@openshift-ci openshift-ci bot requested review from elfosardo and hroyrh March 17, 2026 11:32
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 17, 2026

Important

Review skipped

Auto reviews are limited based on label configuration.

🚫 Review skipped — only excluded labels are configured. (1)
  • do-not-merge/work-in-progress

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 68beaa4f-0dc7-4036-9bfb-399d64ca08d1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@jacob-anders jacob-anders changed the title [release-4.20] PR2774 and PR2793 backports [release-4.20] Bug OCPBUGS-78745: PR2774 and PR2793 backports Mar 18, 2026
@openshift-ci-robot openshift-ci-robot added jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Mar 18, 2026
@openshift-ci-robot
Copy link
Copy Markdown

@jacob-anders: This pull request references Jira Issue OCPBUGS-78745, which is invalid:

  • expected the bug to target either version "4.20." or "openshift-4.20.", but it targets "4.21.z" instead
  • expected Jira Issue OCPBUGS-78745 to depend on a bug targeting a version in 4.21.0, 4.21.z and in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but no dependents were found

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

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

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.

@jacob-anders
Copy link
Copy Markdown
Author

/jira refresh

@openshift-ci-robot
Copy link
Copy Markdown

@jacob-anders: This pull request references Jira Issue OCPBUGS-78745, which is invalid:

  • expected the bug to target either version "4.20." or "openshift-4.20.", but it targets "4.21.z" instead
  • expected Jira Issue OCPBUGS-78745 to depend on a bug targeting a version in 4.21.0, 4.21.z and in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but no dependents were found

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

Details

In response to this:

/jira refresh

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.

@jacob-anders jacob-anders changed the title [release-4.20] Bug OCPBUGS-78745: PR2774 and PR2793 backports OCPBUGS-78745: OCPBUGS-78836: PR2774 and PR2793 backports [release-4.20] Mar 19, 2026
@jacob-anders
Copy link
Copy Markdown
Author

/jira refresh

@openshift-ci-robot
Copy link
Copy Markdown

@jacob-anders: This pull request references Jira Issue OCPBUGS-78745, which is invalid:

  • expected the bug to target either version "4.20." or "openshift-4.20.", but it targets "4.21.z" instead
  • expected Jira Issue OCPBUGS-78745 to depend on a bug targeting a version in 4.21.0, 4.21.z and in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but no dependents were found

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

/jira refresh

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.

@jacob-anders
Copy link
Copy Markdown
Author

/jira refresh

@openshift-ci-robot openshift-ci-robot added the jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. label Mar 31, 2026
@openshift-ci-robot
Copy link
Copy Markdown

@jacob-anders: This pull request references Jira Issue OCPBUGS-78745, which is valid.

7 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.20.z) matches configured target version for branch (4.20.z)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)
  • release note type set to "Release Note Not Required"
  • dependent bug Jira Issue OCPBUGS-65683 is in the state Verified, which is one of the valid states (VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA))
  • dependent Jira Issue OCPBUGS-65683 targets the "4.21.z" version, which is one of the valid target versions: 4.21.0, 4.21.z
  • bug has dependents

Requesting review from QA contact:
/cc @jadhaj

Details

In response to this:

/jira refresh

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.

@openshift-ci-robot openshift-ci-robot removed the jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label Mar 31, 2026
@openshift-ci openshift-ci bot requested a review from jadhaj March 31, 2026 01:00
@jacob-anders
Copy link
Copy Markdown
Author

/verify later

@hroyrh
Copy link
Copy Markdown

hroyrh commented Mar 31, 2026

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 31, 2026
@iurygregory
Copy link
Copy Markdown

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 🤔

donpenney and others added 5 commits April 1, 2026 10:08
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)
Signed-off-by: Sharat Akhoury <sakhoury@redhat.com>
(cherry picked from commit 19e11f5)
(cherry picked from commit 18e7645)
@jacob-anders jacob-anders force-pushed the pr-2774-2793-4.20-backports branch from 290f05a to 6553f52 Compare April 1, 2026 00:13
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Apr 1, 2026
@openshift-ci-robot
Copy link
Copy Markdown

@jacob-anders: This pull request references Jira Issue OCPBUGS-78745, which is valid.

7 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.20.z) matches configured target version for branch (4.20.z)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)
  • release note text is set and does not match the template
  • dependent bug Jira Issue OCPBUGS-65683 is in the state Verified, which is one of the valid states (VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA))
  • dependent Jira Issue OCPBUGS-65683 targets the "4.21.z" version, which is one of the valid target versions: 4.21.0, 4.21.z
  • bug has dependents

Requesting review from QA contact:
/cc @jadhaj

Details

In response to this:

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

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.

@jacob-anders
Copy link
Copy Markdown
Author

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 🤔

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
@openshift-ci
Copy link
Copy Markdown

openshift-ci bot commented Apr 1, 2026

@jacob-anders: all tests passed!

Full PR test history. Your PR dashboard.

Details

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.

@dtantsur
Copy link
Copy Markdown
Member

dtantsur commented Apr 1, 2026

/approve
/label backport-risk-assessed

@openshift-ci openshift-ci bot added the backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. label Apr 1, 2026
@openshift-ci
Copy link
Copy Markdown

openshift-ci bot commented Apr 1, 2026

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 1, 2026
@jacob-anders
Copy link
Copy Markdown
Author

/verified later @jacob-anders

@openshift-ci-robot openshift-ci-robot added verified-later verified Signifies that the PR passed pre-merge verification criteria labels Apr 1, 2026
@openshift-ci-robot
Copy link
Copy Markdown

@jacob-anders: This PR has been marked to be verified later by @jacob-anders.

Details

In response to this:

/verified later @jacob-anders

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.

@iurygregory
Copy link
Copy Markdown

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Apr 1, 2026
@openshift-merge-bot openshift-merge-bot bot merged commit 4e38a27 into openshift:release-4.20 Apr 1, 2026
10 checks passed
@openshift-ci-robot
Copy link
Copy Markdown

@jacob-anders: Jira Issue OCPBUGS-78745: All pull requests linked via external trackers have merged:

This pull request has the verified-later tag and will need to be manually moved to VERIFIED after testing. Jira Issue OCPBUGS-78745 has been moved to the MODIFIED state.

Details

In response to this:

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

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. verified Signifies that the PR passed pre-merge verification criteria verified-later

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants