OCPBUGS-99183: Fix NetworkDiagnosticsConfig serial test race condition#31402
OCPBUGS-99183: Fix NetworkDiagnosticsConfig serial test race condition#31402mkowalski wants to merge 1 commit into
Conversation
The AfterEach handler resets network diagnostics config but does not wait for the openshift-network-diagnostics namespace to be fully recreated. After the "Should remove all network diagnostics pods when disabled" test, the namespace enters Terminating state. The next test starts immediately and cannot find diagnostics pods, polling indefinitely until the 5h job timeout is hit. Add a wait in AfterEach that ensures: 1. The namespace is Active (not Terminating) 2. network-check-source pods exist 3. network-check-target pods exist 4. NetworkDiagnosticsAvailable condition is True This prevents the race between namespace deletion/recreation and the subsequent test that depends on diagnostics pods being available. Fixes: https://issues.redhat.com/browse/OCPBUGS-99183 Signed-off-by: Mateusz Kowalski <mko@redhat.com> Generated-by: AI
|
Pipeline controller notification For optional jobs, comment This repository is configured in: automatic mode |
|
@mkowalski: This pull request references Jira Issue OCPBUGS-99183, which is invalid:
Comment 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. |
WalkthroughThe networking test cleanup now waits after resetting diagnostics configuration until the diagnostics namespace is active, source and target pods exist, and the availability condition is true. ChangesNetwork diagnostics synchronization
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mkowalski 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 |
|
/jira refresh |
|
@mkowalski: This pull request references Jira Issue OCPBUGS-99183, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
No GitHub users were found matching the public email listed for the QA contact in Jira (core-networking-bot@redhat.com), skipping review request. 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. |
|
Scheduling required tests: |
|
@mkowalski: 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. |
Summary
The
AfterEachhandler in theNetworkDiagnosticsConfigserial test suite resets the network diagnostics config but does not wait for theopenshift-network-diagnosticsnamespace to be fully recreated. After the "Should remove all network diagnostics pods when disabled" test, the namespace enters Terminating state. The next test starts immediately and cannot find diagnostics pods, polling indefinitely until the 5h job timeout is hit.Root Cause
Should remove all network diagnostics pods when disableddisables diagnostics → namespace gets deletedAfterEachresets config to nil (default/enabled) but returns immediatelyApplyOperatorConfigDegradedFix
Add a wait in
AfterEachthat ensures:openshift-network-diagnosticsnamespace is Active (not Terminating)network-check-sourcepods existnetwork-check-targetpods existNetworkDiagnosticsAvailablecondition is True5 minute timeout with 5s polling — matching the existing test timeouts in the suite.
Evidence
4 consecutive failures on 5.0 metal techpreview serial jobs (ipv4, ipv6, dualstack), all with identical pattern. Sippy regression ID 43316.
Example: https://prow.ci.openshift.org/view/gs/test-platform-results/logs/periodic-ci-openshift-release-main-nightly-5.0-e2e-metal-ipi-serial-ovn-ipv4-techpreview-1of2/2078329267703255040
Bug
https://issues.redhat.com/browse/OCPBUGS-99183
🤖 This PR was generated by AI on behalf of @mkowalski, who has reviewed it.
Summary by CodeRabbit