Skip to content

fix(kube-ovn): give ovn-central hostPID so its pidfile means something - #263

Merged
gurinderu merged 1 commit into
mainfrom
fix/ovn-central-hostpid
Sep 11, 2026
Merged

fix(kube-ovn): give ovn-central hostPID so its pidfile means something#263
gurinderu merged 1 commit into
mainfrom
fix/ovn-central-hostpid

Conversation

@gurinderu

Copy link
Copy Markdown
Contributor

The last of the four, and it needed a different fix

OVNComponentUnhealthy survived both #258 and #261.

#261 gave kube-ovn-monitor hostPID, and that part worked — the error changed from being deleted by pid 0 to by pid 234187, i.e. the monitor now sees real host PIDs. It still cannot verify northd, because the PID it checks does not exist on the host:

/var/run/ovn/ovn-northd.pid: stale pidfile for pid 544

544 is northd's PID inside ovn-central's own namespace. ovn-central runs without hostPID, so that is what northd writes into a pidfile living in a hostPath shared with every other kube-ovn component. Nobody outside that one container can make sense of it.

Why the other two worked immediately

kube-ovn-cni and ovs-ovn have always run with hostPID: true, so the pidfiles they write carry host PIDs — which is why the pinger's checks against ovs-vswitchd, ovsdb-server and ovn-controller all passed the moment #258 landed.

ovn-central is now the only writer left in that shared directory whose PIDs are namespace-local.

Rollout note — this one is not free

Unlike #258 and #261, this restarts the OVN control plane. ovn-central runs a single replica here, so northd and the northbound and southbound databases all go down briefly while the pod is replaced.

Existing datapath flows keep forwarding — ovn-controller and OVS are untouched — but no new logical configuration is programmed until it is back. Worth doing at a quiet moment rather than alongside other changes.

Verification

Same two ways as the previous patches: the JSON6902 patch run through kustomize against the live Deployment flips hostPID from unset to true without disturbing the pod spec, and kubectl kustomize flux/apps/kube-system/kube-ovn/app builds.

The last of the four alerts, OVNComponentUnhealthy, survived #258 and
#261 and needed a different fix from the other three.

#261 gave kube-ovn-monitor hostPID, and that part worked — the error
message changed from "being deleted by pid 0" to "by pid 234187", i.e.
the monitor now sees real host PIDs. It still cannot verify northd,
because the PID it is checking does not exist on the host:

  /var/run/ovn/ovn-northd.pid: stale pidfile for pid 544

544 is northd's PID inside ovn-central's own namespace. ovn-central runs
without hostPID, so that is what northd writes into a pidfile living in a
hostPath shared with every other kube-ovn component. Nobody outside that
one container can make sense of it.

This is why kube-ovn-cni and ovs-ovn have always worked: they run with
hostPID: true, so the pidfiles they write carry host PIDs, and the
pinger's checks against them passed the moment #258 landed. ovn-central
is now the only writer left in the shared directory whose PIDs are
namespace-local.

Same postRenderer, third target.

NOTE FOR ROLLOUT, unlike the previous two: this restarts the OVN control
plane. ovn-central runs a single replica here, so northd, the northbound
and the southbound databases all go down briefly while the pod is
replaced. Existing datapath flows keep forwarding — ovn-controller and
OVS are untouched — but no new logical configuration is programmed until
it is back. Worth doing at a quiet moment rather than alongside other
changes.

Verified the same two ways as the previous patches: the JSON6902 patch
run through kustomize against the live Deployment flips hostPID from
unset to true without disturbing the pod spec, and the manifest builds.
@gurinderu
gurinderu merged commit aba615c into main Sep 11, 2026
1 check passed
@gurinderu
gurinderu deleted the fix/ovn-central-hostpid branch September 11, 2026 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant