Skip to content

OCPBUGS-98696: baremetal: fix provisioning ISO kernel arguments#10702

Open
jacob-anders wants to merge 1 commit into
openshift:mainfrom
jacob-anders:fix-provisioning-iso-kargs
Open

OCPBUGS-98696: baremetal: fix provisioning ISO kernel arguments#10702
jacob-anders wants to merge 1 commit into
openshift:mainfrom
jacob-anders:fix-provisioning-iso-kargs

Conversation

@jacob-anders

@jacob-anders jacob-anders commented Jul 21, 2026

Copy link
Copy Markdown

The provisioning ISO was missing ip=dhcp, causing bare metal nodes to fail to obtain an IP on the provisioning network. Additionally, console=ttyS0 without baud/parity data was causing lockups on some hardware.

Add ip=dhcp to the kernel arguments and specify baud rate and parity for serial console devices. Also append a trailing newline to preserve the COREOS_KARG_EMBED_AREA boundary for downstream consumers.

Summary by CodeRabbit

  • Bug Fixes
    • Improved kernel boot argument generation for live volume creation with consistent trailing newline formatting.
    • Updated x86_64 serial console settings (now includes the baud/format) and ensures fips=1 is added only when FIPS is enabled.
    • Avoids producing kernel arguments when an architecture is unrecognized and FIPS is disabled.
  • Tests
    • Added table-driven unit tests covering kernel argument generation for x86_64, aarch64, s390x, ppc64le, plus an unknown-architecture case.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Changes

Live ISO kernel arguments

Layer / File(s) Summary
Kernel argument construction and live-volume wiring
pkg/infrastructure/baremetal/bootstrap.go
buildBootstrapKargs centralizes architecture-specific console selection, optional fips=1, and trailing-newline handling before passing arguments to the RHCOS stream reader. Unknown architectures with FIPS disabled produce nil.
Architecture and FIPS validation
pkg/infrastructure/baremetal/bootstrap_test.go
Table-driven tests cover supported and unknown architectures, console values, FIPS inclusion, and newline termination.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 14 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (14 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: updating baremetal provisioning ISO kernel arguments.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed Only static testing subtest names were added; no Ginkgo titles or dynamic identifiers appear in the changed tests.
Test Structure And Quality ✅ Passed The change adds a focused table-driven unit test with no cluster setup, waits, or cleanup needs; the repo also uses testify-style tests here, not Ginkgo.
Microshift Test Compatibility ✅ Passed Only unit tests and kernel-arg helper code changed; no new Ginkgo e2e tests or MicroShift-unsupported OpenShift APIs were added.
Single Node Openshift (Sno) Test Compatibility ✅ Passed No new Ginkgo e2e tests were added; the only new test is a Go unit test, and it doesn't assume multi-node or HA behavior.
Topology-Aware Scheduling Compatibility ✅ Passed This PR only changes baremetal ISO kernel-arg assembly/tests; no deployment, controller, affinity, nodeSelector, or replica scheduling logic was added.
Ote Binary Stdout Contract ✅ Passed Changes only add a bootstrap kargs helper and unit tests; no main/init/TestMain/suite setup or stdout writes were introduced.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed Only unit tests were added; no new Ginkgo e2e tests or external connectivity assumptions appear in the changed files.
No-Weak-Crypto ✅ Passed No MD5/SHA1/DES/RC4/3DES/Blowfish/ECB, custom crypto, or secret comparisons were added; the patch only builds boot kargs.
Container-Privileges ✅ Passed PASS: The PR only changes baremetal bootstrap Go code; no container/K8s manifest files were touched and no privileged or host* settings appear in the modified files.
No-Sensitive-Data-In-Logs ✅ Passed No new logging was added in the PR; the touched code only builds kernel args and passes them through, with no secrets/PII emitted to logs.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

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


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.

@openshift-ci
openshift-ci Bot requested review from elfosardo and iurygregory July 21, 2026 22:39
@jacob-anders

Copy link
Copy Markdown
Author

/test images

@jacob-anders jacob-anders changed the title [DNM] baremetal: fix provisioning ISO kernel arguments baremetal: fix provisioning ISO kernel arguments Jul 22, 2026
@jacob-anders jacob-anders changed the title baremetal: fix provisioning ISO kernel arguments OCPBUGS-98696: baremetal: fix provisioning ISO kernel arguments Jul 22, 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/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Jul 22, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

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

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

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

Details

In response to this:

The provisioning ISO was missing ip=dhcp, causing bare metal nodes to fail to obtain an IP on the provisioning network. Additionally, console=ttyS0 without baud/parity data was causing lockups on some hardware.

Add ip=dhcp to the kernel arguments and specify baud rate and parity for serial console devices. Also append a trailing newline to preserve the COREOS_KARG_EMBED_AREA boundary for downstream consumers.

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

/test all

@jacob-anders

Copy link
Copy Markdown
Author

/test golint

@jacob-anders

Copy link
Copy Markdown
Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@tdomnesc

Copy link
Copy Markdown
Contributor

/pipeline required

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling required tests:
/test e2e-azure-nat-gateway-single-zone

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-metal-assisted
/test e2e-metal-ipi-ovn
/test e2e-metal-ipi-ovn-dualstack
/test e2e-metal-ipi-ovn-ipv6
/test e2e-metal-ipi-ovn-swapped-hosts
/test e2e-metal-ipi-ovn-virtualmedia
/test e2e-metal-ovn-two-node-arbiter
/test e2e-metal-ovn-two-node-fencing
/test e2e-metal-single-node-live-iso
/test e2e-aws-ovn

@elfosardo

Copy link
Copy Markdown
Contributor

/approve

@openshift-ci

openshift-ci Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: elfosardo

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 Jul 22, 2026
@jacob-anders

Copy link
Copy Markdown
Author

/hold
adding unit tests made some chaos I need to clean this up before merging

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 22, 2026
@jacob-anders
jacob-anders force-pushed the fix-provisioning-iso-kargs branch from 8aa47fd to 5d6d1ce Compare July 22, 2026 09:25
@jacob-anders

Copy link
Copy Markdown
Author

/pipeline required

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling required tests:
/test e2e-azure-nat-gateway-single-zone

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-metal-assisted
/test e2e-metal-ipi-ovn
/test e2e-metal-ipi-ovn-dualstack
/test e2e-metal-ipi-ovn-ipv6
/test e2e-metal-ipi-ovn-swapped-hosts
/test e2e-metal-ipi-ovn-virtualmedia
/test e2e-metal-ovn-two-node-arbiter
/test e2e-metal-ovn-two-node-fencing
/test e2e-metal-single-node-live-iso
/test e2e-aws-ovn

@jacob-anders

Copy link
Copy Markdown
Author

/unhold

@openshift-ci openshift-ci Bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 22, 2026
@MahnoorAsghar

Copy link
Copy Markdown
Contributor

/retest
The failures in the 5 failing tests all look like they couldnt pull an image

@jacob-anders

Copy link
Copy Markdown
Author

/test artifacts-images

@jacob-anders

Copy link
Copy Markdown
Author

/test e2e-metal-single-node-live-iso

2 similar comments
@jacob-anders

Copy link
Copy Markdown
Author

/test e2e-metal-single-node-live-iso

@jacob-anders

Copy link
Copy Markdown
Author

/test e2e-metal-single-node-live-iso

@jacob-anders

Copy link
Copy Markdown
Author

/test e2e-azure-nat-gateway-single-zone

@jacob-anders

Copy link
Copy Markdown
Author

/test e2e-metal-single-node-live-iso

1 similar comment
@jacob-anders

Copy link
Copy Markdown
Author

/test e2e-metal-single-node-live-iso

@jacob-anders

Copy link
Copy Markdown
Author

/retest-required

1 similar comment
@jacob-anders

Copy link
Copy Markdown
Author

/retest-required

@jacob-anders

Copy link
Copy Markdown
Author

/test e2e-metal-ovn-two-node-fencing

@jacob-anders

Copy link
Copy Markdown
Author

/test e2e-metal-single-node-live-iso

2 similar comments
@jacob-anders

Copy link
Copy Markdown
Author

/test e2e-metal-single-node-live-iso

@jacob-anders

Copy link
Copy Markdown
Author

/test e2e-metal-single-node-live-iso

@jacob-anders

Copy link
Copy Markdown
Author

/retest-required

@jacob-anders

Copy link
Copy Markdown
Author

/test e2e-metal-single-node-live-iso

1 similar comment
@jacob-anders

Copy link
Copy Markdown
Author

/test e2e-metal-single-node-live-iso

@jacob-anders

Copy link
Copy Markdown
Author

/test e2e-metal-ipi-ovn-ipv6

@jacob-anders

Copy link
Copy Markdown
Author

/test e2e-metal-single-node-live-iso

Add explicit baud/parity (115200n8) to the console karg on the
bootstrap live ISO. Without baud/parity, the kernel defaults to
9600n8 which causes lockups on some hardware.

Extract kargs construction into buildBootstrapKargs() with table-driven
unit tests covering all architectures, FIPS, and trailing newline.

Assisted-By: Claude Opus 4.6
@jacob-anders
jacob-anders force-pushed the fix-provisioning-iso-kargs branch from 5d6d1ce to 7a4ef03 Compare July 24, 2026 05:37

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
pkg/infrastructure/baremetal/bootstrap_test.go (1)

149-162: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Cover FIPS for an unknown architecture.

Add riscv64 with fips: true expecting fips=1 and no console=. Prefer an explicit expectNil field over inferring nil from the expectation slices.

Proposed test adjustment
 		expectContains []string
 		expectMissing  []string
+		expectNil      bool
@@
 		{
-			name:          "unknown arch returns nil",
-			arch:          "riscv64",
-			fips:          false,
-			expectMissing: []string{"console="},
+			name:      "unknown arch returns nil",
+			arch:      "riscv64",
+			expectNil: true,
+		},
+		{
+			name:           "unknown arch with FIPS",
+			arch:           "riscv64",
+			fips:           true,
+			expectContains: []string{"fips=1"},
+			expectMissing:  []string{"console="},
 		},
@@
-			if len(tc.expectContains) == 0 && len(tc.expectMissing) > 0 {
+			if tc.expectNil {
 				assert.Nil(t, result, "kargs should be nil for unknown arch without FIPS")
 				return
 			}

As per path instructions, “Verify edge cases are covered, especially for validation and defaulting logic.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/infrastructure/baremetal/bootstrap_test.go` around lines 149 - 162, Add
coverage in the buildBootstrapKargs table for unknown architecture riscv64 with
fips enabled, expecting fips=1 and no console= argument. Update the test cases
to use an explicit expectNil field when asserting nil results, and adjust the
validation in the test loop to honor that field rather than inferring nil from
expectation slices.

Source: Path instructions

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@pkg/infrastructure/baremetal/bootstrap_test.go`:
- Around line 149-162: Add coverage in the buildBootstrapKargs table for unknown
architecture riscv64 with fips enabled, expecting fips=1 and no console=
argument. Update the test cases to use an explicit expectNil field when
asserting nil results, and adjust the validation in the test loop to honor that
field rather than inferring nil from expectation slices.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 7db0348f-d685-48f0-ab93-da9b7daa25e2

📥 Commits

Reviewing files that changed from the base of the PR and between 5d6d1ce and 7a4ef03.

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

@zaneb

zaneb commented Jul 24, 2026

Copy link
Copy Markdown
Member

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 24, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling required tests:
/test e2e-azure-nat-gateway-single-zone

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-metal-assisted
/test e2e-metal-ipi-ovn
/test e2e-metal-ipi-ovn-dualstack
/test e2e-metal-ipi-ovn-ipv6
/test e2e-metal-ipi-ovn-swapped-hosts
/test e2e-metal-ipi-ovn-virtualmedia
/test e2e-metal-ovn-two-node-arbiter
/test e2e-metal-ovn-two-node-fencing
/test e2e-metal-single-node-live-iso
/test e2e-aws-ovn

sgoveas added a commit to sgoveas/release that referenced this pull request Jul 24, 2026
@sgoveas

sgoveas commented Jul 24, 2026

Copy link
Copy Markdown

/verified by sgoveas link

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Jul 24, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@sgoveas: This PR has been marked as verified by sgoveas [link](https://redhat.atlassian.net/browse/OCPBUGS-98696?focusedCommentId=17716161).

Details

In response to this:

/verified by sgoveas link

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-merge-bot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD d8f6a96 and 2 for PR HEAD 7a4ef03 in total

@openshift-ci

openshift-ci Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

@jacob-anders: 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-single-node-live-iso 7a4ef03 link false /test e2e-metal-single-node-live-iso
ci/prow/e2e-metal-ipi-ovn-dualstack 7a4ef03 link false /test e2e-metal-ipi-ovn-dualstack
ci/prow/e2e-metal-ipi-ovn-virtualmedia 7a4ef03 link false /test e2e-metal-ipi-ovn-virtualmedia
ci/prow/e2e-aws-ovn 7a4ef03 link true /test e2e-aws-ovn

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

approved Indicates a PR has been approved by an approver from all required OWNERS files. 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants