OCPEDGE-2381: Validate no WAL corruption when both nodes shutdown gracefully#30925
OCPEDGE-2381: Validate no WAL corruption when both nodes shutdown gracefully#30925kasturinarra wants to merge 1 commit intoopenshift:mainfrom
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: automatic mode |
|
@kasturinarra: This pull request references OCPEDGE-2381 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. |
WalkthroughA new test case is added to the etcd recovery test suite that validates cluster recovery behavior when both nodes undergo simultaneous graceful shutdown. The test schedules reboot on both nodes, waits 90 seconds, validates etcd recovery state with expected member roles, and verifies that the openshift-etcd container is running on both nodes afterward. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes ✨ 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.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: kasturinarra 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
test/extended/two_node/tnf_recovery.go (1)
413-435: Avoid a second copy of this suite block.This repeats the
Describe/BeforeEachabove, and the copy has already drifted by dropping[OCPFeatureGate:DualReplica]. Please add the newItto the existing suite instead so markers and setup stay in one place.As per coding guidelines, "Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity."
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@test/extended/two_node/tnf_recovery.go` around lines 413 - 435, There is a duplicated Describe/BeforeEach block for the "[sig-etcd] Two Node with Fencing etcd recovery" suite; remove the second Describe block and instead add the new test It into the original suite so setup and markers (including the [OCPFeatureGate:DualReplica] tag) remain intact. Locate the duplicate Describe(...) block that defines oc, etcdClientFactory, peerNode, targetNode and its BeforeEach, delete that duplicated Describe/BeforeEach, and move the new It test body into the existing Describe that already declares oc and uses BeforeEach/etcdClientFactory so the markers and shared setup are not dropped. Ensure the moved It references the same oc, etcdClientFactory, peerNode and targetNode variables and keep all original markers on the suite.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@test/extended/two_node/tnf_recovery.go`:
- Around line 449-463: The test currently calls
validateEtcdRecoveryState(targetNode, peerNode, ...) without first proving the
scheduled reboots actually happened; capture each node's pre-disruption boot-id
(e.g., via exutil.DebugNodeRetryWithOptionsAndChroot calling "cat
/proc/sys/kernel/random/boot_id") before issuing "shutdown -r 1", then poll both
nodes after the disruption and wait until their boot-id values have changed
(with a timeout) before calling validateEtcdRecoveryState; place this boot-id
capture and change-check around the existing shutdown/recovery logic and use the
same targetNode and peerNode identifiers so the test fails if a node never
rebooted.
---
Nitpick comments:
In `@test/extended/two_node/tnf_recovery.go`:
- Around line 413-435: There is a duplicated Describe/BeforeEach block for the
"[sig-etcd] Two Node with Fencing etcd recovery" suite; remove the second
Describe block and instead add the new test It into the original suite so setup
and markers (including the [OCPFeatureGate:DualReplica] tag) remain intact.
Locate the duplicate Describe(...) block that defines oc, etcdClientFactory,
peerNode, targetNode and its BeforeEach, delete that duplicated
Describe/BeforeEach, and move the new It test body into the existing Describe
that already declares oc and uses BeforeEach/etcdClientFactory so the markers
and shared setup are not dropped. Ensure the moved It references the same oc,
etcdClientFactory, peerNode and targetNode variables and keep all original
markers on the suite.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 1c865daf-4792-4b5c-b9f9-dcd740484608
📒 Files selected for processing (1)
test/extended/two_node/tnf_recovery.go
|
Scheduling required tests: |
|
@kasturinarra: 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. |
No description provided.