Skip to content

OCPBUGS-78151: Add provisioningNetworkGateway field to install-config#10387

Open
jadhaj wants to merge 1 commit intoopenshift:mainfrom
jadhaj:OCPBUGS-78151
Open

OCPBUGS-78151: Add provisioningNetworkGateway field to install-config#10387
jadhaj wants to merge 1 commit intoopenshift:mainfrom
jadhaj:OCPBUGS-78151

Conversation

@jadhaj
Copy link
Contributor

@jadhaj jadhaj commented Mar 12, 2026

Changes to installer:

  1. Platform Types (pkg/types/baremetal/platform.go):
    - Added ProvisioningNetworkGateway field to baremetal Platform struct
  2. Validation (pkg/types/baremetal/validation/platform.go):
    - Added validation to ensure gateway is within provisioning network CIDR
    - Added validation to ensure gateway is not in DHCP range
    - Added validation to ensure gateway is not the same as cluster provisioning IP
  3. Bootstrap Template (pkg/asset/ignition/bootstrap/baremetal/template.go):
    - Added ProvisioningNetworkGateway field to template data struct
    - Added assignment from config to template data
  4. Provisioning CR Template (data/data/manifests/openshift/baremetal-provisioning-config.yaml.template):
    - Added provisioningNetworkGateway to the generated Provisioning CR
  5. Bootstrap Environment (data/data/bootstrap/baremetal/files/etc/ironic.env.template):
    - Added GATEWAY_IP variable for dnsmasq
  6. Bootstrap Container (data/data/bootstrap/baremetal/files/etc/containers/systemd/ironic-dnsmasq.container):
    - Added GATEWAY_IP environment variable to dnsmasq container

Summary by CodeRabbit

Release Notes

  • New Features
    • Added support for specifying a provisioning network gateway IP address in baremetal configurations. The gateway is provided to hosts via DHCP during provisioning when the provisioning network is set to Managed mode. Gateway validation ensures it doesn't conflict with DHCP ranges or cluster IPs.

@coderabbitai
Copy link

coderabbitai bot commented Mar 12, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

This pull request adds support for configuring a provisioning network gateway IP address in baremetal deployments. The feature enables users to specify a custom gateway that will be supplied to hosts via DHCP, threading the value through configuration, type definitions, validation, and bootstrap components.

Changes

Cohort / File(s) Summary
Configuration & Bootstrap Templates
data/data/bootstrap/baremetal/files/etc/containers/systemd/ironic-dnsmasq.container, data/data/bootstrap/baremetal/files/etc/ironic.env.template
Added GATEWAY_IP environment variable references to provisioning environment configuration and container systemd service files.
Manifest Templates
data/data/manifests/openshift/baremetal-provisioning-config.yaml.template
Added provisioningNetworkGateway field to baremetal provisioning config manifest specification.
Platform Type Definition
pkg/types/baremetal/platform.go
Added ProvisioningNetworkGateway string field to Platform struct with kubebuilder IP validation and JSON serialization tags.
Validation Logic
pkg/types/baremetal/validation/platform.go
Implemented validation rules to ensure ProvisioningNetworkGateway is a valid IP, does not overlap with DHCP range, is contained within provisioning network CIDR, and differs from cluster provisioning IP. Modified clusterProvisioningIP CIDR check to be conditional on non-empty value.
Ignition Template Data
pkg/asset/ignition/bootstrap/baremetal/template.go
Added ProvisioningNetworkGateway field to TemplateData struct with logic to populate from config when provisioning network is managed.
OpenAPI Schema
data/data/install.openshift.io_installconfigs.yaml
Added provisioningNetworkGateway field to InstallConfig CRD schema with string type, IP format validation, and documentation describing usage constraints.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main change: adding a provisioningNetworkGateway field to the install-config across all necessary components.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Stable And Deterministic Test Names ✅ Passed The custom check for stable and deterministic Ginkgo test names is not applicable to this PR. The PR does not modify or introduce any test files—it only changes source code and configuration templates.
Test Structure And Quality ✅ Passed This PR contains no Ginkgo test code, only standard Go testing patterns with testing.T and testify assertions.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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

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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
pkg/asset/agent/manifests/agentclusterinstall.go (1)

295-302: ⚠️ Potential issue | 🟠 Major

Don't gate provisioningNetworkGateway on per-host BMC overrides.

Line 301 is inside the host-override branch, so the new field is only serialized into install-config-overrides when at least one AgentHost overrides BMC data. A cluster that sets only provisioningNetworkGateway will silently lose it in the generated AgentClusterInstall.

Suggested fix
+			if installConfig.Config.Platform.BareMetal.ProvisioningNetworkGateway != "" {
+				baremetalPlatform.ProvisioningNetworkGateway = installConfig.Config.Platform.BareMetal.ProvisioningNetworkGateway
+				bmIcOverridden = true
+			}
+
 			for _, host := range agentHosts.Hosts {
 				// Override if BMC values are not the same as default
 				if host.BMC.Username != "" || host.BMC.Password != "" || host.BMC.Address != "" {
 					bmhost := baremetal.Host{
 						Name: host.Hostname,
@@
-					baremetalPlatform.ProvisioningNetworkGateway = installConfig.Config.Platform.BareMetal.ProvisioningNetworkGateway
 				}
 			}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pkg/asset/agent/manifests/agentclusterinstall.go` around lines 295 - 302, The
provisioningNetworkGateway field is currently only assigned inside the AgentHost
BMC-override branch so a cluster that only sets
installConfig.Config.Platform.BareMetal.ProvisioningNetworkGateway gets dropped
from the generated AgentClusterInstall/install-config-overrides; move or
duplicate the assignment so baremetalPlatform.ProvisioningNetworkGateway is set
unconditionally (outside the per-host BMC override branch) using
installConfig.Config.Platform.BareMetal.ProvisioningNetworkGateway, ensuring
AgentHost logic remains unchanged and the AgentClusterInstall includes the
gateway even when no AgentHost overrides are present.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@pkg/types/baremetal/validation/platform.go`:
- Around line 608-621: The gateway validation is nested inside the
clusterProvisioningIP failure branch so provisioningNetworkGateway checks only
run when clusterProvisioningIP is invalid; move the provisioningNetworkGateway
validation out so it always runs independently. Specifically, in the function
performing these checks (the block using p.ProvisioningNetworkCIDR.Contains and
fldPath.Child), ensure the block that checks p.ProvisioningNetworkGateway != ""
and then validates Contains(...) and equality against p.ClusterProvisioningIP is
not inside the if that appends the clusterProvisioningIP error — extract or
reposition the provisioningNetworkGateway if-block to follow the
clusterProvisioningIP check at the same scope so both validations execute
regardless of the other’s result.

---

Outside diff comments:
In `@pkg/asset/agent/manifests/agentclusterinstall.go`:
- Around line 295-302: The provisioningNetworkGateway field is currently only
assigned inside the AgentHost BMC-override branch so a cluster that only sets
installConfig.Config.Platform.BareMetal.ProvisioningNetworkGateway gets dropped
from the generated AgentClusterInstall/install-config-overrides; move or
duplicate the assignment so baremetalPlatform.ProvisioningNetworkGateway is set
unconditionally (outside the per-host BMC override branch) using
installConfig.Config.Platform.BareMetal.ProvisioningNetworkGateway, ensuring
AgentHost logic remains unchanged and the AgentClusterInstall includes the
gateway even when no AgentHost overrides are present.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 797c6121-3d92-4413-b1d0-a65305263c3d

📥 Commits

Reviewing files that changed from the base of the PR and between b9c6f8e and 0d7706d.

📒 Files selected for processing (7)
  • data/data/bootstrap/baremetal/files/etc/containers/systemd/ironic-dnsmasq.container
  • data/data/bootstrap/baremetal/files/etc/ironic.env.template
  • data/data/manifests/openshift/baremetal-provisioning-config.yaml.template
  • pkg/asset/agent/manifests/agentclusterinstall.go
  • pkg/asset/ignition/bootstrap/baremetal/template.go
  • pkg/types/baremetal/platform.go
  • pkg/types/baremetal/validation/platform.go

@openshift-ci openshift-ci bot requested review from bfournie and elfosardo March 12, 2026 14:51
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 12, 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 sadasu 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

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@data/data/install.openshift.io_installconfigs.yaml`:
- Around line 6110-6117: Update the provisioningNetworkGateway field description
to state it is only honored when the installer is managing provisioning DHCP
(i.e., installer-managed provisioning network path); specifically modify the
provisioningNetworkGateway description text so it clarifies that the provided
gateway is used only for installer-managed provisioning DHCP and is ignored in
unmanaged/disabled provisioning modes, leaving the format and type unchanged.

In `@pkg/types/baremetal/validation/platform.go`:
- Around line 613-622: The provisioningNetworkGateway value
(p.ProvisioningNetworkGateway) must be validated for correct IP format in
ValidatePlatform before calling net.ParseIP/Contains; add the same IP format
check used for bootstrapProvisioningIP/clusterProvisioningIP: attempt
net.ParseIP(p.ProvisioningNetworkGateway), and if nil append a field.Invalid on
fldPath.Child("provisioningNetworkGateway") with an "invalid IP address" message
and skip the subsequent CIDR containment and equality checks; only perform the
Contains check and the comparison to p.ClusterProvisioningIP when the parsed IP
is non-nil.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 996ad102-350b-4791-a845-17ee395290f6

📥 Commits

Reviewing files that changed from the base of the PR and between 0d7706d and 2bb28bd.

📒 Files selected for processing (8)
  • data/data/bootstrap/baremetal/files/etc/containers/systemd/ironic-dnsmasq.container
  • data/data/bootstrap/baremetal/files/etc/ironic.env.template
  • data/data/install.openshift.io_installconfigs.yaml
  • data/data/manifests/openshift/baremetal-provisioning-config.yaml.template
  • pkg/asset/agent/manifests/agentclusterinstall.go
  • pkg/asset/ignition/bootstrap/baremetal/template.go
  • pkg/types/baremetal/platform.go
  • pkg/types/baremetal/validation/platform.go
🚧 Files skipped from review as they are similar to previous changes (2)
  • data/data/bootstrap/baremetal/files/etc/ironic.env.template
  • pkg/types/baremetal/platform.go

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
pkg/types/baremetal/validation/platform.go (1)

615-628: ⚠️ Potential issue | 🔴 Critical

Gateway validation is still incorrectly nested inside the clusterProvisioningIP failure block.

The provisioningNetworkGateway checks (lines 619-627) are nested inside the if !p.ProvisioningNetworkCIDR.Contains(...) block for clusterProvisioningIP (line 615). This means gateway validation only executes when clusterProvisioningIP is outside the provisioning CIDR—an invalid gateway will be silently accepted whenever clusterProvisioningIP is valid.

The closing brace on line 628 closes the clusterProvisioningIP check, not a separate block.

Proposed fix: unnest gateway validation
 		// Ensure clusterProvisioningIP is in the provisioningNetworkCIDR
 		if !p.ProvisioningNetworkCIDR.Contains(net.ParseIP(p.ClusterProvisioningIP)) {
 			allErrs = append(allErrs, field.Invalid(fldPath.Child("clusterProvisioningIP"), p.ClusterProvisioningIP, fmt.Sprintf("%q is not in the provisioning network", p.ClusterProvisioningIP)))
+		}
 
-			// Ensure provisioningNetworkGateway is in the provisioningNetworkCIDR
-			if p.ProvisioningNetworkGateway != "" {
-				if !p.ProvisioningNetworkCIDR.Contains(net.ParseIP(p.ProvisioningNetworkGateway)) {
-					allErrs = append(allErrs, field.Invalid(fldPath.Child("provisioningNetworkGateway"), p.ProvisioningNetworkGateway, fmt.Sprintf("%q is not in the provisioning network", p.ProvisioningNetworkGateway)))
-				}
-				// Ensure gateway is not the same as clusterProvisioningIP
-				if p.ProvisioningNetworkGateway == p.ClusterProvisioningIP {
-					allErrs = append(allErrs, field.Invalid(fldPath.Child("provisioningNetworkGateway"), p.ProvisioningNetworkGateway, "cannot be the same as clusterProvisioningIP"))
-				}
+		// Ensure provisioningNetworkGateway is in the provisioningNetworkCIDR
+		if p.ProvisioningNetworkGateway != "" {
+			if !p.ProvisioningNetworkCIDR.Contains(net.ParseIP(p.ProvisioningNetworkGateway)) {
+				allErrs = append(allErrs, field.Invalid(fldPath.Child("provisioningNetworkGateway"), p.ProvisioningNetworkGateway, fmt.Sprintf("%q is not in the provisioning network", p.ProvisioningNetworkGateway)))
+			}
+			// Ensure gateway is not the same as clusterProvisioningIP
+			if p.ProvisioningNetworkGateway == p.ClusterProvisioningIP {
+				allErrs = append(allErrs, field.Invalid(fldPath.Child("provisioningNetworkGateway"), p.ProvisioningNetworkGateway, "cannot be the same as clusterProvisioningIP"))
 			}
 		}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pkg/types/baremetal/validation/platform.go` around lines 615 - 628, The
gateway validation for p.ProvisioningNetworkGateway is incorrectly nested inside
the failure branch for p.ClusterProvisioningIP; move the block that checks
p.ProvisioningNetworkGateway (the net.ParseIP +
p.ProvisioningNetworkCIDR.Contains check and the equality check against
p.ClusterProvisioningIP that append field.Invalid using
fldPath.Child("provisioningNetworkGateway")) out of the surrounding if
!p.ProvisioningNetworkCIDR.Contains(net.ParseIP(p.ClusterProvisioningIP)) block
so gateway validation always runs independently, preserving the same error
messages and use of net.ParseIP and field.Invalid.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@pkg/types/baremetal/validation/platform.go`:
- Around line 615-628: The gateway validation for p.ProvisioningNetworkGateway
is incorrectly nested inside the failure branch for p.ClusterProvisioningIP;
move the block that checks p.ProvisioningNetworkGateway (the net.ParseIP +
p.ProvisioningNetworkCIDR.Contains check and the equality check against
p.ClusterProvisioningIP that append field.Invalid using
fldPath.Child("provisioningNetworkGateway")) out of the surrounding if
!p.ProvisioningNetworkCIDR.Contains(net.ParseIP(p.ClusterProvisioningIP)) block
so gateway validation always runs independently, preserving the same error
messages and use of net.ParseIP and field.Invalid.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 80ce833b-69e9-4fba-8afc-bb302ab9a21c

📥 Commits

Reviewing files that changed from the base of the PR and between 2bb28bd and ce43035.

📒 Files selected for processing (8)
  • data/data/bootstrap/baremetal/files/etc/containers/systemd/ironic-dnsmasq.container
  • data/data/bootstrap/baremetal/files/etc/ironic.env.template
  • data/data/install.openshift.io_installconfigs.yaml
  • data/data/manifests/openshift/baremetal-provisioning-config.yaml.template
  • pkg/asset/agent/manifests/agentclusterinstall.go
  • pkg/asset/ignition/bootstrap/baremetal/template.go
  • pkg/types/baremetal/platform.go
  • pkg/types/baremetal/validation/platform.go
🚧 Files skipped from review as they are similar to previous changes (4)
  • pkg/asset/agent/manifests/agentclusterinstall.go
  • data/data/install.openshift.io_installconfigs.yaml
  • pkg/types/baremetal/platform.go
  • data/data/manifests/openshift/baremetal-provisioning-config.yaml.template

@jadhaj jadhaj changed the title Add provisioningNetworkGateway field to install-config OCPBUGS-78151: Add provisioningNetworkGateway field to install-config Mar 13, 2026
@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 13, 2026
@openshift-ci-robot
Copy link
Contributor

@jadhaj: This pull request references Jira Issue OCPBUGS-78151, 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:

Changes to installer:

  1. Platform Types (pkg/types/baremetal/platform.go):
  • Added ProvisioningNetworkGateway field to baremetal Platform struct
  1. Validation (pkg/types/baremetal/validation/platform.go):
  • Added validation to ensure gateway is within provisioning network CIDR
  • Added validation to ensure gateway is not in DHCP range
  • Added validation to ensure gateway is not the same as cluster provisioning IP
  1. Agent Manifest (pkg/asset/agent/manifests/agentclusterinstall.go):
  • Added ProvisioningNetworkGateway field to agent baremetal platform struct
  • Added assignment from install-config to agent manifest
  1. Bootstrap Template (pkg/asset/ignition/bootstrap/baremetal/template.go):
  • Added ProvisioningNetworkGateway field to template data struct
  • Added assignment from config to template data
  1. Provisioning CR Template (data/data/manifests/openshift/baremetal-provisioning-config.yaml.template):
  • Added provisioningNetworkGateway to the generated Provisioning CR
  1. Bootstrap Environment (data/data/bootstrap/baremetal/files/etc/ironic.env.template):
  • Added GATEWAY_IP variable for dnsmasq
  1. Bootstrap Container (data/data/bootstrap/baremetal/files/etc/containers/systemd/ironic-dnsmasq.container):
  • Added GATEWAY_IP environment variable to dnsmasq container

Summary by CodeRabbit

  • New Features

  • Add support for specifying a provisioning network gateway IP for bare metal deployments.

  • Propagate the gateway into provisioning manifests and boot/environment templates so hosts receive it via DHCP.

  • Bug Fixes

  • Validate the gateway IP is a valid address, lies within the provisioning CIDR, and does not conflict with DHCP ranges or the cluster provisioning IP.

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.

@jadhaj
Copy link
Contributor Author

jadhaj commented Mar 13, 2026

/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 13, 2026
@openshift-ci-robot
Copy link
Contributor

@jadhaj: This pull request references Jira Issue OCPBUGS-78151, 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-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 13, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 13, 2026

@openshift-ci-robot: GitHub didn't allow me to request PR reviews from the following users: jadhaj.

Note that only openshift members and repo collaborators can review this PR, and authors cannot review their own PRs.

Details

In response to this:

@jadhaj: This pull request references Jira Issue OCPBUGS-78151, 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

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.

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.

@openshift-ci-robot
Copy link
Contributor

@jadhaj: This pull request references Jira Issue OCPBUGS-78151, which is valid.

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 POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @jadhaj

Details

In response to this:

Changes to installer:

  1. Platform Types (pkg/types/baremetal/platform.go):
  • Added ProvisioningNetworkGateway field to baremetal Platform struct
  1. Validation (pkg/types/baremetal/validation/platform.go):
  • Added validation to ensure gateway is within provisioning network CIDR
  • Added validation to ensure gateway is not in DHCP range
  • Added validation to ensure gateway is not the same as cluster provisioning IP
  1. Agent Manifest (pkg/asset/agent/manifests/agentclusterinstall.go):
  • Added ProvisioningNetworkGateway field to agent baremetal platform struct
  • Added assignment from install-config to agent manifest
  1. Bootstrap Template (pkg/asset/ignition/bootstrap/baremetal/template.go):
  • Added ProvisioningNetworkGateway field to template data struct
  • Added assignment from config to template data
  1. Provisioning CR Template (data/data/manifests/openshift/baremetal-provisioning-config.yaml.template):
  • Added provisioningNetworkGateway to the generated Provisioning CR
  1. Bootstrap Environment (data/data/bootstrap/baremetal/files/etc/ironic.env.template):
  • Added GATEWAY_IP variable for dnsmasq
  1. Bootstrap Container (data/data/bootstrap/baremetal/files/etc/containers/systemd/ironic-dnsmasq.container):
  • Added GATEWAY_IP environment variable to dnsmasq container

Summary by CodeRabbit

Release Notes

  • New Features
  • Added support for specifying a provisioning network gateway IP address in baremetal configurations. The gateway is provided to hosts via DHCP during provisioning when the provisioning network is set to Managed mode. Gateway validation ensures it doesn't conflict with DHCP ranges or cluster IPs.

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
Copy link
Contributor

openshift-ci bot commented Mar 13, 2026

@openshift-ci-robot: GitHub didn't allow me to request PR reviews from the following users: jadhaj.

Note that only openshift members and repo collaborators can review this PR, and authors cannot review their own PRs.

Details

In response to this:

@jadhaj: This pull request references Jira Issue OCPBUGS-78151, which is valid.

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 POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @jadhaj

In response to this:

Changes to installer:

  1. Platform Types (pkg/types/baremetal/platform.go):
  • Added ProvisioningNetworkGateway field to baremetal Platform struct
  1. Validation (pkg/types/baremetal/validation/platform.go):
  • Added validation to ensure gateway is within provisioning network CIDR
  • Added validation to ensure gateway is not in DHCP range
  • Added validation to ensure gateway is not the same as cluster provisioning IP
  1. Agent Manifest (pkg/asset/agent/manifests/agentclusterinstall.go):
  • Added ProvisioningNetworkGateway field to agent baremetal platform struct
  • Added assignment from install-config to agent manifest
  1. Bootstrap Template (pkg/asset/ignition/bootstrap/baremetal/template.go):
  • Added ProvisioningNetworkGateway field to template data struct
  • Added assignment from config to template data
  1. Provisioning CR Template (data/data/manifests/openshift/baremetal-provisioning-config.yaml.template):
  • Added provisioningNetworkGateway to the generated Provisioning CR
  1. Bootstrap Environment (data/data/bootstrap/baremetal/files/etc/ironic.env.template):
  • Added GATEWAY_IP variable for dnsmasq
  1. Bootstrap Container (data/data/bootstrap/baremetal/files/etc/containers/systemd/ironic-dnsmasq.container):
  • Added GATEWAY_IP environment variable to dnsmasq container

Summary by CodeRabbit

Release Notes

  • New Features
  • Added support for specifying a provisioning network gateway IP address in baremetal configurations. The gateway is provided to hosts via DHCP during provisioning when the provisioning network is set to Managed mode. Gateway validation ensures it doesn't conflict with DHCP ranges or cluster IPs.

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.

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.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 13, 2026

@jadhaj: 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/e2e-metal-ipi-ovn-ipv6 e9d501c link true /test e2e-metal-ipi-ovn-ipv6
ci/prow/e2e-agent-4control-ipv4 ca45242 link false /test e2e-agent-4control-ipv4
ci/prow/e2e-aws-ovn e9d501c link true /test e2e-aws-ovn
ci/prow/e2e-agent-ha-dualstack ca45242 link false /test e2e-agent-ha-dualstack
ci/prow/e2e-metal-ovn-two-node-fencing e9d501c link false /test e2e-metal-ovn-two-node-fencing
ci/prow/e2e-agent-compact-ipv6-minimaliso ca45242 link false /test e2e-agent-compact-ipv6-minimaliso
ci/prow/e2e-agent-two-node-fencing-ipv4 ca45242 link false /test e2e-agent-two-node-fencing-ipv4
ci/prow/e2e-agent-compact-ipv4-iso-no-registry ca45242 link false /test e2e-agent-compact-ipv4-iso-no-registry
ci/prow/e2e-metal-ipi-ovn-virtualmedia e9d501c link false /test e2e-metal-ipi-ovn-virtualmedia
ci/prow/integration-tests ca45242 link true /test integration-tests
ci/prow/e2e-metal-ipi-ovn e9d501c link false /test e2e-metal-ipi-ovn
ci/prow/e2e-agent-compact-ipv4 ca45242 link true /test e2e-agent-compact-ipv4
ci/prow/e2e-metal-ipi-ovn-dualstack e9d501c link false /test e2e-metal-ipi-ovn-dualstack
ci/prow/e2e-agent-5control-ipv4 ca45242 link false /test e2e-agent-5control-ipv4
ci/prow/e2e-metal-ovn-two-node-arbiter e9d501c link false /test e2e-metal-ovn-two-node-arbiter
ci/prow/e2e-agent-compact-ipv4-none-platform ca45242 link false /test e2e-agent-compact-ipv4-none-platform
ci/prow/e2e-agent-sno-ipv6 ca45242 link false /test e2e-agent-sno-ipv6
ci/prow/e2e-agent-sno-ipv4-pxe ca45242 link false /test e2e-agent-sno-ipv4-pxe
ci/prow/e2e-metal-ipi-ovn-swapped-hosts e9d501c link false /test e2e-metal-ipi-ovn-swapped-hosts

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