Skip to content

OCPBUGS-78126: baremetal: fix gather bootstrap failing with provisioningNetwork Disabled#10395

Open
honza wants to merge 1 commit intoopenshift:mainfrom
honza:external-boostrap-ip
Open

OCPBUGS-78126: baremetal: fix gather bootstrap failing with provisioningNetwork Disabled#10395
honza wants to merge 1 commit intoopenshift:mainfrom
honza:external-boostrap-ip

Conversation

@honza
Copy link
Member

@honza honza commented Mar 16, 2026

When provisioningNetwork is Disabled, BootstrapProvisioningIP is not set by SetPlatformDefaults because there is no provisioning network. This causes the automated gather bootstrap to fail with "must provide bootstrap host address" even though the bootstrap VM is reachable.

Add fallback logic in ExtractHostAddresses to use
BootstrapExternalStaticIP or the API VIP (which is hosted on the bootstrap node during early installation) when BootstrapProvisioningIP is empty.

…bled

When provisioningNetwork is Disabled, BootstrapProvisioningIP is not set
by SetPlatformDefaults because there is no provisioning network. This
causes the automated gather bootstrap to fail with "must provide
bootstrap host address" even though the bootstrap VM is reachable.

Add fallback logic in ExtractHostAddresses to use
BootstrapExternalStaticIP or the API VIP (which is hosted on the
bootstrap node during early installation) when BootstrapProvisioningIP
is empty.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@openshift-ci-robot openshift-ci-robot added jira/severity-moderate Referenced Jira bug's severity is moderate 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 16, 2026
@openshift-ci-robot
Copy link
Contributor

@honza: This pull request references Jira Issue OCPBUGS-78126, which is invalid:

  • expected the bug to target the "4.22.0" version, but no target version was set

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:

When provisioningNetwork is Disabled, BootstrapProvisioningIP is not set by SetPlatformDefaults because there is no provisioning network. This causes the automated gather bootstrap to fail with "must provide bootstrap host address" even though the bootstrap VM is reachable.

Add fallback logic in ExtractHostAddresses to use
BootstrapExternalStaticIP or the API VIP (which is hosted on the bootstrap node during early installation) when BootstrapProvisioningIP is empty.

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.

@coderabbitai
Copy link

coderabbitai bot commented Mar 16, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ca075e8d-056f-4bd5-aa04-47e3e01c9d8b

📥 Commits

Reviewing files that changed from the base of the PR and between 3528292 and 9620d2c.

📒 Files selected for processing (2)
  • pkg/infrastructure/baremetal/baremetal.go
  • pkg/infrastructure/baremetal/baremetal_test.go

Walkthrough

Modified the ExtractHostAddresses function in the baremetal infrastructure provider to implement a two-step fallback mechanism for determining the bootstrap address. When BootstrapProvisioningIP is empty, the code now falls back to BootstrapExternalStaticIP, and if that is also empty, uses the first API VIP. Added corresponding test coverage for these scenarios.

Changes

Cohort / File(s) Summary
Baremetal Bootstrap Address Logic
pkg/infrastructure/baremetal/baremetal.go
Added fallback chain for bootstrap address determination: BootstrapProvisioningIPBootstrapExternalStaticIPAPIVIPs[0]. Enables bootstrap address resolution when provisioning network is disabled and no provisioning IP is configured.
Baremetal Address Extraction Tests
pkg/infrastructure/baremetal/baremetal_test.go
New test suite validating ExtractHostAddresses logic across multiple scenarios: provisioning network enabled/disabled, static IP fallback, API VIP fallback, and error handling. Verifies priority rules and master address derivation from NIC IPs.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

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.11.3)

Error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions
The command is terminated due to an error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions


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

@honza
Copy link
Member Author

honza commented Mar 16, 2026

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Mar 16, 2026
@openshift-ci-robot
Copy link
Contributor

@honza: This pull request references Jira Issue OCPBUGS-78126, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.22.0) matches configured target version for branch (4.22.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

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 openshift-ci bot requested review from dtantsur, elfosardo and jadhaj March 16, 2026 19:25
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 16, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign honza for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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
Copy link
Contributor

openshift-ci bot commented Mar 17, 2026

@honza: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/golint 9620d2c link true /test golint
ci/prow/e2e-metal-ipi-ovn-virtualmedia 9620d2c link false /test e2e-metal-ipi-ovn-virtualmedia
ci/prow/okd-scos-images 9620d2c link true /test okd-scos-images
ci/prow/e2e-metal-ovn-two-node-fencing 9620d2c link false /test e2e-metal-ovn-two-node-fencing
ci/prow/e2e-metal-ipi-ovn-dualstack 9620d2c link false /test e2e-metal-ipi-ovn-dualstack

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.

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

Labels

jira/severity-moderate Referenced Jira bug's severity is moderate 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants