OCPBUGS-123513: Recover kubelet startup after transient OVS failures #6637
All Vouch review confidence checks passed
Residual risk 0.45 = Change Risk (0.82) × (1 − Review Confidence (0.45)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.82 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.344
Sensitive Paths
sensitive_paths
0.082
Real PR Conversation Timeline
1 comments
"Review active on #6637"
general
weight: 0.35
mkowalski
A transient OVS startup failure can leave dependent boot jobs failed even after OVS recovers through its own restart policy. Consequently, CRI-O and kubelet remain inactive without automatic recovery.
This change:
OnFailure=hook tokubelet-dependencies.targetand a static oneshot recovery service.kubelet.servicestart transaction. This preserves systemd dependency ordering without separately restarting networking oneshots.Root Cause:
ovs-vswitchd.servicemay fail its activation because loading the openvswitch kernel module temporarily fails or there due to other reasons, for example:ovs-vswitchd.servicehas its own restart policy, systemd can successfully restart it shortly afterward. However, that recovery applies only toovs-vswitchd.service. It does not automatically retry units whose activation transaction previously failed becauseovs-vswitchd.servicewas unavailable.The dependency chain is effectively:
The important relationships are:
observes ovs-vswitchd.serviceas failed, systemd may markopenvswitch.serviceand the downstream units as failed with a dependency result. Whenovs-vswitchd.servicelater recovers throughRestart=always, systemd does not reevaluate and automatically restart the already-failed parent and dependent units.Consequently, the node can reach the following inconsistent state:
How to verify it
Passed locally:
go vet, Bash syntax, formatting, and template-regeneration checks.containers_image_openpgpbecause localgpgmedevelopment files were unavailable.Passed on OCP version 5.0.0-rc.2 on a live cluster from a test image build:
ovs-kubelet-recovery.service.Log Analysis:
worker-0node and verified it became ready.Signed-off-by: Ramesh Sahoo <rsahoo@redhat.com>
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
New Features
OVNKubernetes clusters can automatically attempt to restore Open vSwitch and kubelet services after a dependency failure.
Recovery attempts are limited and time-bound. Other network types are unaffected.
Tests
Added coverage for recovery configuration across network types, node roles, and deployment scenarios.
Added end-to-end validation of recovery following an Open vSwitch startup failure, including checks that essential services return to a healthy state.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->