OCPBUGS-98696: baremetal: fix provisioning ISO kernel arguments#10702
OCPBUGS-98696: baremetal: fix provisioning ISO kernel arguments#10702jacob-anders wants to merge 1 commit into
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
📝 WalkthroughWalkthroughChangesLive ISO kernel arguments
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 14 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (14 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 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 |
|
/test images |
|
@jacob-anders: This pull request references Jira Issue OCPBUGS-98696, which is valid. 3 validation(s) were run on this bug
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. |
|
/test all |
|
/test golint |
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
/pipeline required |
|
Scheduling required tests: Scheduling tests matching the |
|
/approve |
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/hold |
8aa47fd to
5d6d1ce
Compare
|
/pipeline required |
|
Scheduling required tests: Scheduling tests matching the |
|
/unhold |
|
/retest |
|
/test artifacts-images |
|
/test e2e-metal-single-node-live-iso |
2 similar comments
|
/test e2e-metal-single-node-live-iso |
|
/test e2e-metal-single-node-live-iso |
|
/test e2e-azure-nat-gateway-single-zone |
|
/test e2e-metal-single-node-live-iso |
1 similar comment
|
/test e2e-metal-single-node-live-iso |
|
/retest-required |
1 similar comment
|
/retest-required |
|
/test e2e-metal-ovn-two-node-fencing |
|
/test e2e-metal-single-node-live-iso |
2 similar comments
|
/test e2e-metal-single-node-live-iso |
|
/test e2e-metal-single-node-live-iso |
|
/retest-required |
|
/test e2e-metal-single-node-live-iso |
1 similar comment
|
/test e2e-metal-single-node-live-iso |
|
/test e2e-metal-ipi-ovn-ipv6 |
|
/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
5d6d1ce to
7a4ef03
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (1)
pkg/infrastructure/baremetal/bootstrap_test.go (1)
149-162: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winCover FIPS for an unknown architecture.
Add
riscv64withfips: trueexpectingfips=1and noconsole=. Prefer an explicitexpectNilfield 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
📒 Files selected for processing (2)
pkg/infrastructure/baremetal/bootstrap.gopkg/infrastructure/baremetal/bootstrap_test.go
|
/lgtm |
|
Scheduling required tests: Scheduling tests matching the |
|
/verified by sgoveas link |
|
@sgoveas: This PR has been marked as verified 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. |
|
@jacob-anders: The following tests failed, say
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. |
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
fips=1is added only when FIPS is enabled.x86_64,aarch64,s390x,ppc64le, plus an unknown-architecture case.