Skip to content

Fix nsx-ncp liveness probe broken by nsx-ujo change 823215 - #320

Merged
ggverma merged 1 commit into
vmware:mainfrom
ggverma:fix/ncp-healthz-liveness-probe
Aug 7, 2026
Merged

Fix nsx-ncp liveness probe broken by nsx-ujo change 823215#320
ggverma merged 1 commit into
vmware:mainfrom
ggverma:fix/ncp-healthz-liveness-probe

Conversation

@ggverma

@ggverma ggverma commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • nsx-ujo change 823215 replaced NCP's exec-based liveness probe with an in-process httpGet probe on :8086/healthz, and removed the "nsx-ncp" handler from check_pod_liveness's dispatch table entirely.
  • This operator's static manifests (ncp-openshift4.yaml, ncp-rhel.yaml, ncp-ubuntu.yaml) still invoke the removed exec probe (check_pod_liveness nsx-ncp 30). Since "nsx-ncp" is no longer a recognized target, the script falls through to null_handler, which always reports failure -- so the liveness probe now always fails and kubelet restart-loops the NCP pod on every platform this operator manages (OpenShift, RHEL, Ubuntu Kubernetes).
  • Switches all three manifests to the same httpGet probe nsx-ujo now ships: containerPort: 8086, host: 127.0.0.1 (all three pods already run hostNetwork: true, so kubelet and NCP share the host network namespace and loopback is reachable), preserving the existing initialDelaySeconds/timeoutSeconds/periodSeconds/failureThreshold.

@ggverma
ggverma force-pushed the fix/ncp-healthz-liveness-probe branch from ecd6284 to 36d8584 Compare August 6, 2026 16:31
NCP's liveness probe mechanism changed from an exec-based external
script to an in-process httpGet probe served on :8086/healthz. The
old exec probe command is no longer supported and now always fails,
causing kubelet to restart-loop the nsx-ncp pod on every platform this
operator manages.

Switch the exec probe to httpGet on 127.0.0.1:8086/healthz (all three
pods run hostNetwork: true, so kubelet and NCP share the host network
namespace and loopback is reachable), keeping the same
initialDelaySeconds/timeoutSeconds/periodSeconds/failureThreshold as
before.

Deliberately not declaring a containerPort for 8086: on a
hostNetwork: true pod, declaring it makes the scheduler track that
port as an exclusive per-node reservation. A rolling update needs two
new-template replicas to be schedulable before any old replica is
removed, and two pods can never simultaneously hold the same exclusive
hostPort on one node -- when available nodes drop to or below the
replica count, this deadlocks the rollout forever. E2E CI caught this
directly: a single-node Kind cluster scaled to 2 replicas got stuck
with both new-template pods Pending indefinitely, and the NcpInstall
CRD never reported Available. The declaration isn't needed for the
probe to work either -- hostNetwork means the process binds :8086
regardless, and kubelet's httpGet probe reaches it via host/port
directly, not via the pod's ports field.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@ggverma
ggverma force-pushed the fix/ncp-healthz-liveness-probe branch from 36d8584 to 08972e2 Compare August 6, 2026 16:37

@salv-orlando salv-orlando left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ggverma
ggverma merged commit 2d4894c into vmware:main Aug 7, 2026
3 of 9 checks passed
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.

2 participants