Skip to content

OCPBUGS-82072 OCPBUGS-82077: fix: skip unused tests for two node#30998

Open
eggfoobar wants to merge 1 commit intoopenshift:mainfrom
eggfoobar:skip-baremetal-worker-checks-on-twonode
Open

OCPBUGS-82072 OCPBUGS-82077: fix: skip unused tests for two node#30998
eggfoobar wants to merge 1 commit intoopenshift:mainfrom
eggfoobar:skip-baremetal-worker-checks-on-twonode

Conversation

@eggfoobar
Copy link
Copy Markdown
Contributor

currently for two node fencing we do not support extra workers, skipping these tests for DualReplica topology

@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: automatic mode

@openshift-ci-robot openshift-ci-robot added 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 Apr 10, 2026
@openshift-ci-robot
Copy link
Copy Markdown

@eggfoobar: This pull request references Jira Issue OCPBUGS-82072, 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.

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

currently for two node fencing we do not support extra workers, skipping these tests for DualReplica topology

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
Copy Markdown

coderabbitai bot commented Apr 10, 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: bf1c0619-3913-4b90-9a5c-9e705a17b577

📥 Commits

Reviewing files that changed from the base of the PR and between ddd95d6 and b9669ac.

📒 Files selected for processing (3)
  • test/extended/baremetal/common.go
  • test/extended/baremetal/high_availability.go
  • test/extended/baremetal/hosts.go

Walkthrough

Added a process-wide, mutex-guarded cached helper clusterInfrastructure(oc) that retries on Get failures; added skipIfTwoNode(oc) which uses that helper to skip tests on two-node control-plane topology; updated baremetal tests to use the new skip helper.

Changes

Cohort / File(s) Summary
Infrastructure Caching Helper
test/extended/baremetal/common.go
Added a mutex-protected, process-wide cached clusterInfrastructure(oc) that caches only successful Infrastructures().Get(...) results; updated existing skip helpers to use it; added skipIfTwoNode(oc) to skip tests when Status.ControlPlaneTopology == configv1.DualReplicaTopologyMode.
Baremetal Test Conditionals
test/extended/baremetal/high_availability.go, test/extended/baremetal/hosts.go
Replaced hardcoded expectations with infrastructure-derived values in checkMetal3DeploymentHealthy; added skipIfTwoNode(oc) to BeforeEach in the Serial baremetal tests to skip two-node deployments before setup.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@openshift-ci openshift-ci bot requested review from deads2k and p0lyn0mial April 10, 2026 18:18
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 10, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: eggfoobar
Once this PR has been reviewed and has the lgtm label, please assign ardaguclu 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

@eggfoobar
Copy link
Copy Markdown
Contributor Author

/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 Apr 10, 2026
@openshift-ci-robot
Copy link
Copy Markdown

@eggfoobar: This pull request references Jira Issue OCPBUGS-82072, 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)

This pull request references Jira Issue OCPBUGS-82077, 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)
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.

Copy link
Copy Markdown

@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.

Caution

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

⚠️ Outside diff range comments (2)
test/extended/baremetal/hosts.go (1)

166-175: ⚠️ Potential issue | 🔴 Critical

Guard the cleanup against uninitialized helper.

When skipIfTwoNode(oc) skips the test, helper is never initialized. Ginkgo v2 still executes the AfterEach hook in this case, which calls helper.DeleteAllExtraWorkers() on a nil receiver—causing a panic. Since DeleteAllExtraWorkers doesn't guard against nil receivers, either:

  • Guard the cleanup: if helper != nil { helper.DeleteAllExtraWorkers() }, or
  • Initialize helper before skip checks.

This pattern also appears in test/extended/baremetal/high_availability.go.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/extended/baremetal/hosts.go` around lines 166 - 175, The AfterEach
cleanup calls helper.DeleteAllExtraWorkers() even when helper may be nil because
skipIfTwoNode(oc) can skip BeforeEach; update the AfterEach block to guard the
call (e.g., if helper != nil { helper.DeleteAllExtraWorkers() }) so
DeleteAllExtraWorkers is only invoked on an initialized NewBaremetalTestHelper,
and apply the same nil-check change to the corresponding AfterEach in
high_availability.go to prevent a panic.
test/extended/baremetal/high_availability.go (1)

40-49: ⚠️ Potential issue | 🟠 Major

Add nil-check guard in AfterEach cleanup.

DeleteAllExtraWorkers (helper.go:137) checks if b.extraWorkers == nil but does not guard against a nil receiver. When skipIfTwoNode(oc) skips the test before helper is assigned, Ginkgo v2 still executes the AfterEach block, causing helper.DeleteAllExtraWorkers() to panic on a nil receiver.

Guard the cleanup call:

g.AfterEach(func() {
	if helper != nil {
		helper.DeleteAllExtraWorkers()
	}
})
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/extended/baremetal/high_availability.go` around lines 40 - 49, The
AfterEach cleanup calls helper.DeleteAllExtraWorkers() without guarding against
helper being nil which can panic if Setup was skipped (e.g., due to
skipIfTwoNode); update the AfterEach to check the helper receiver before calling
DeleteAllExtraWorkers (i.e., ensure helper != nil) so DeleteAllExtraWorkers is
only invoked when NewBaremetalTestHelper successfully assigned helper and avoid
nil receiver panics from Ginkgo v2 executing AfterEach even when BeforeEach
skipped.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@test/extended/baremetal/high_availability.go`:
- Around line 40-49: The AfterEach cleanup calls helper.DeleteAllExtraWorkers()
without guarding against helper being nil which can panic if Setup was skipped
(e.g., due to skipIfTwoNode); update the AfterEach to check the helper receiver
before calling DeleteAllExtraWorkers (i.e., ensure helper != nil) so
DeleteAllExtraWorkers is only invoked when NewBaremetalTestHelper successfully
assigned helper and avoid nil receiver panics from Ginkgo v2 executing AfterEach
even when BeforeEach skipped.

In `@test/extended/baremetal/hosts.go`:
- Around line 166-175: The AfterEach cleanup calls
helper.DeleteAllExtraWorkers() even when helper may be nil because
skipIfTwoNode(oc) can skip BeforeEach; update the AfterEach block to guard the
call (e.g., if helper != nil { helper.DeleteAllExtraWorkers() }) so
DeleteAllExtraWorkers is only invoked on an initialized NewBaremetalTestHelper,
and apply the same nil-check change to the corresponding AfterEach in
high_availability.go to prevent a panic.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c2c27ace-b83b-4b86-a6db-63b0d16ca46e

📥 Commits

Reviewing files that changed from the base of the PR and between 3521349 and ddd95d6.

📒 Files selected for processing (3)
  • test/extended/baremetal/common.go
  • test/extended/baremetal/high_availability.go
  • test/extended/baremetal/hosts.go

currently for two node fencing we do not support extra workers, skipping these tests for DualReplica topology
updated test to account for correct baremetal operator state during tnf deployments

Signed-off-by: ehila <ehila@redhat.com>
@eggfoobar eggfoobar force-pushed the skip-baremetal-worker-checks-on-twonode branch from ddd95d6 to b9669ac Compare April 10, 2026 18:36
@eggfoobar
Copy link
Copy Markdown
Contributor Author

/payload-job
periodic-ci-openshift-release-main-nightly-4.22-e2e-metal-ovn-two-node-fencing-serial-techpreview

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 10, 2026

@eggfoobar: trigger 3 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-main-nightly-4.22-e2e-metal-ovn-two-node-fencing-serial-techpreview-1of3
  • periodic-ci-openshift-release-main-nightly-4.22-e2e-metal-ovn-two-node-fencing-serial-techpreview-2of3
  • periodic-ci-openshift-release-main-nightly-4.22-e2e-metal-ovn-two-node-fencing-serial-techpreview-3of3

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/7df390b0-350c-11f1-8c63-6c1fd6462c30-0

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

Scheduling required tests:
/test e2e-aws-csi
/test e2e-aws-ovn-fips
/test e2e-aws-ovn-microshift
/test e2e-aws-ovn-microshift-serial
/test e2e-aws-ovn-serial-1of2
/test e2e-aws-ovn-serial-2of2
/test e2e-gcp-csi
/test e2e-gcp-ovn
/test e2e-gcp-ovn-upgrade
/test e2e-metal-ipi-ovn-ipv6
/test e2e-vsphere-ovn
/test e2e-vsphere-ovn-upi

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-metal-ovn-two-node-arbiter
/test e2e-metal-ovn-two-node-fencing
/test e2e-metal-ovn-two-node-fencing-recovery

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 10, 2026

@eggfoobar: 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-aws-ovn-fips b9669ac link true /test e2e-aws-ovn-fips
ci/prow/e2e-vsphere-ovn b9669ac link true /test e2e-vsphere-ovn
ci/prow/e2e-metal-ovn-two-node-fencing b9669ac link false /test e2e-metal-ovn-two-node-fencing

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/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