OCPEDGE-2379: new test to add an extra worker on TNA cluster#30876
OCPEDGE-2379: new test to add an extra worker on TNA cluster#30876agullon wants to merge 1 commit intoopenshift:mainfrom
Conversation
pre-commit.check-secrets: ENABLED
|
Pipeline controller notification For optional jobs, comment This repository is configured in: automatic mode |
|
@agullon: This pull request references OCPEDGE-2379 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set. 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. |
WalkthroughIntroduces a new end-to-end test file for extending a two-node OpenShift cluster with an extra worker node under HighlyAvailableArbiter mode. The test covers BMH provisioning, CSR approval, node readiness validation, MCP convergence, and pod scheduling capabilities with comprehensive error handling and logging. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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 Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: agullon The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@agullon: This pull request references OCPEDGE-2379 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set. 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. |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
test/extended/two_node/tna_extra_worker.go (2)
48-50:GinkgoRecover()placement is ineffective here.
defer g.GinkgoRecover()is intended to catch panics in goroutines spawned during tests and convert them to Ginkgo failures. At the top level of aDescribeblock (outside any goroutine), it has no practical effect since the Ginkgo framework already handles panics in the main test flow. Consider removing it or moving it inside any goroutines if spawned.♻️ Suggested removal
var _ = g.Describe("[sig-node][apigroup:config.openshift.io][OCPFeatureGate:HighlyAvailableArbiter][Serial] Extra worker scaling in HighlyAvailableArbiterMode", func() { - defer g.GinkgoRecover() - oc := exutil.NewCLIWithoutNamespace("").AsAdmin()🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@test/extended/two_node/tna_extra_worker.go` around lines 48 - 50, The deferred call to g.GinkgoRecover() placed at the top of the Describe block is ineffective because Describe runs in the main test flow; move or remove it: locate the var _ = g.Describe(...) block and either remove the line "defer g.GinkgoRecover()" or, if you spawn goroutines inside that Describe, place "defer g.GinkgoRecover()" at the start of each goroutine function (or inside the BeforeEach/It that launches the goroutine) so panics in those goroutines are converted to Ginkgo failures.
311-374: Hardcoded BMH provisioning values limit portability.The hardcoded
bootMode=UEFIandrootDeviceHints=/dev/sdavalues (lines 327-330) are specific to dev-scripts VMs as noted in the comment. If this test needs to run on other environments in the future, consider extracting these as configuration or deriving them from BMH hardware inventory.The current implementation is acceptable for the stated use case, but flagging for awareness.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@test/extended/two_node/tna_extra_worker.go` around lines 311 - 374, The patch hardcodes bootMode="UEFI" and rootDeviceHints.deviceName="/dev/sda" inside triggerBMHProvisioning which reduces portability; update triggerBMHProvisioning (and its callers) to accept bootMode and rootDeviceName as parameters or read them from a configurable source (env/config struct) and use those values when building the patch map, or alternatively query the BMH hardware inventory (e.g., unstructured host.Object fields) to derive appropriate values before creating the patch; change references to the hardcoded literals in triggerBMHProvisioning to use the new parameters/config variables so other environments can override them.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@test/extended/two_node/tna_extra_worker.go`:
- Around line 48-50: The deferred call to g.GinkgoRecover() placed at the top of
the Describe block is ineffective because Describe runs in the main test flow;
move or remove it: locate the var _ = g.Describe(...) block and either remove
the line "defer g.GinkgoRecover()" or, if you spawn goroutines inside that
Describe, place "defer g.GinkgoRecover()" at the start of each goroutine
function (or inside the BeforeEach/It that launches the goroutine) so panics in
those goroutines are converted to Ginkgo failures.
- Around line 311-374: The patch hardcodes bootMode="UEFI" and
rootDeviceHints.deviceName="/dev/sda" inside triggerBMHProvisioning which
reduces portability; update triggerBMHProvisioning (and its callers) to accept
bootMode and rootDeviceName as parameters or read them from a configurable
source (env/config struct) and use those values when building the patch map, or
alternatively query the BMH hardware inventory (e.g., unstructured host.Object
fields) to derive appropriate values before creating the patch; change
references to the hardcoded literals in triggerBMHProvisioning to use the new
parameters/config variables so other environments can override them.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: bb518009-a333-429a-a292-566ea2aa575f
📒 Files selected for processing (1)
test/extended/two_node/tna_extra_worker.go
Adding a new Test Case to create a extra worker on a TNA cluster as a 2 day operation.
extraworkers-secret)extraworkers-secretThis is a successful log example: