USHIFT-7501: Stop openvswitch after OVN cleanup in microshift-cleanup-data - #7347
USHIFT-7501: Stop openvswitch after OVN cleanup in microshift-cleanup-data#7347agullon wants to merge 1 commit into
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@agullon: This pull request references USHIFT-7501 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 bug to target the "5.1.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. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: agullon 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 |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 12 included reviews per hour; 10 remain after this review. WalkthroughThe cleanup script stops ChangesOpen vSwitch cleanup
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to Cleanup now stops Open vSwitch after OVN cleanup to remove stale datapath state. No concrete unresolved production-impact risk is identified for this change. Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 14 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (14 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
/pipeline required |
|
Scheduling tests matching the |
|
/retest |
|
/cherrypick release-5.0 |
|
@agullon: once the present PR merges, I will cherry-pick it on top of 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 kubernetes-sigs/prow repository. |
|
/override ci/prow/e2e-aws-tests-bootc-el9 because only 2 scenarios failed and failures are not related to this change |
|
/verified by CI |
|
@agullon: Overrode contexts on behalf of agullon: ci/prow/e2e-aws-tests-bootc-el10, ci/prow/e2e-aws-tests-bootc-el9 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 kubernetes-sigs/prow repository. |
|
@agullon: 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. |
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
|
@agullon: This pull request references USHIFT-7501 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 bug to target the "5.1.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. |
…-data After `microshift-cleanup-data --all` (or `--ovn`) stops ovsdb-server and kills the OVN processes, ovs-vswitchd is left running without its database, so stale OVS datapath/flow state persists. On the next MicroShift start ovnkube-node fatals during init while clearing stale OVS flow targets: failed to init default node network controller: error clearing stale ovs flow targets: "exit status 1" ovnkube-node then crash-loops, never writes the node chassis / gateway config, and every pod is stuck FailedCreatePodSandBox / NetworkPluginNotReady until the healthcheck times out. This was observed intermittently under heavy full-optional load (e.g. the el98-lrel@optional release scenario). Stop openvswitch.service after the OVN process cleanup so the stale state is cleared. The next MicroShift start brings openvswitch back up via microshift.service's Wants and microshift-ovs-init.service's Requires, giving OVN a clean slate to reinitialize. Unlike the best-effort kills above, a real stop failure here has a correctness impact, so it is surfaced rather than discarded. The underlying fragility (ovnkube-node treating the ovs-vsctl failure as fatal) is upstream ovn-kubernetes; this change removes the precondition on the MicroShift side. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> pre-commit.check-secrets: ENABLED
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
|
/pipeline required |
|
Scheduling tests matching the |
|
/pipeline auto |
|
Pipeline controller notification The |
|
/verified by CI |
|
/cherrypick release-5.0 |
|
@agullon: once the present PR merges, I will cherry-pick it on top of 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 kubernetes-sigs/prow repository. |
|
@agullon: 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. |
Summary
After
microshift-cleanup-data --all(or--ovn) stopsovsdb-serverand kills the OVN processes,ovs-vswitchdis left running without its database, leaving stale OVS datapath/flow state. On the next MicroShift start,ovnkube-nodefatals during init while clearing stale OVS flow targets:ovnkube-nodethen crash-loops, never writes the node chassis / gateway config, and every pod is stuckFailedCreatePodSandBox/NetworkPluginNotReadyuntil the healthcheck times out.Fix
Stop
openvswitch.serviceafter the OVN process cleanup inclean_processes(), so the stale OVS state is cleared. The next MicroShift start bringsopenvswitchback up viamicroshift.service'sWants=andmicroshift-ovs-init.service'sRequires=, giving OVN a clean slate to reinitialize. Unlike the best-effort kills above, a real stop failure here has a correctness impact, so it is surfaced (WARN to stderr) rather than discarded.The underlying fragility —
ovnkube-nodetreating theovs-vsctlfailure as fatal — is upstream ovn-kubernetes; this change removes the precondition on the MicroShift side.Where observed
Intermittently under heavy full-optional load, e.g. the
el98-lrel@optionalrelease scenario (MicroShift 5.0.0-rc.0 testing). Also implicated in the intermittentstandard1HostnameVerify MicroShift restarts correctlyflake, which exercises the same clean-data + restart + healthcheck path.Testing
Not unit-testable in isolation — reproduction requires a running cluster where
microshift-cleanup-data --all+ restart is followed by OVN reinit under load. Mechanism confirmed from ovnkube-node logs and the OVS service dependency graph. Will validate via CI e2e once the PR runs.Jira
https://issues.redhat.com/browse/USHIFT-7501
Summary by CodeRabbit