AKS icon indicating copy to clipboard operation
AKS copied to clipboard

NPD retains a healthy message after the condition changes to a fault

Open hydracz opened this issue 1 month ago • 2 comments

Problem

When a custom plugin returns exit code 1 with empty stdout, NPD updates the condition status and reason but retains the previous healthy message:

type: XIDError
status: "True"
reason: XIDErrorIsPresent
message: XID error status is good

Impact

The condition reports a fault and a healthy state simultaneously, making alerts and troubleshooting misleading.

Versions

  • AKS 1.35.8, Ubuntu 24.04.5.
  • NPD: 0.8.25-ubuntu24.04u25.
  • AKS NPD configuration: 1.0.0-ubuntu24.04u2.

Quick reproduction

Use a disposable GPU node with RFC 3339 syslog timestamps and an initially healthy XIDError=False. Synthetic logs may trigger alerts or remediation; do not use a production node.

On the test node, in a root shell, inject one synthetic log message:

printf '%s\n' \
  '<3>NVRM: Xid (PCI:0000:00:00): 79, pid=99999, name=NPD_XID_LAB, GPU has fallen off the bus. SYNTHETIC LOG ONLY; no hardware fault.' \
  > /dev/kmsg

From the terminal configured for the test cluster:

NODE='your-test-gpu-node'
sleep 70
kubectl get node "$NODE" \
  -o jsonpath='{range .status.conditions[?(@.type=="XIDError")]}{.status}{" | "}{.reason}{" | "}{.message}{"\n"}{end}'

Observed output:

True | XIDErrorIsPresent | XID error status is good

Key log

The managed NPD journal recorded an empty message for the new fault state:

Node condition XIDError is now: True, reason: XIDErrorIsPresent, message: ""

The API condition nevertheless retained the previous healthy message. Only a log was injected; no physical GPU fault was generated.

Expected fix

Explicitly clear or replace the old message when publishing the new condition. The empty message is currently omitted during serialization, so the status patch preserves the previous value. Add a regression test for this transition.

Environment

  • Region: southeastasia
  • AKS Kubernetes version: v1.35.8 (created with az aks create --kubernetes-version 1.35.8 --tier free)
  • Node pool: Standard_NC4as_T4_v3 (Tesla T4, driver 580.159.04), Spot
  • Node image: AKSUbuntu-2404gen2containerd-202610.23.0
  • OS / kernel: Ubuntu 24.04.5 LTS / 6.8.0-1071-azure
  • Managed NPD: node-problem-detector-kubernetes 0.8.25-ubuntu24.04u25, node-problem-detector-aks-config 1.0.0-ubuntu24.04u2
  • Xid plugin invocation interval 60s, timeout 20s; managed NPD service and scripts were not modified.

hydracz avatar Nov 03 '26 03:11 hydracz

@swgriffith, @wenjungaogaogao, @djsly would you be able to assist?

Thanks for sharing. We've fixed the issue and it will roll out with the next aks-vm-extensions release.

ganeshkumarashok avatar Nov 13 '26 04:11 ganeshkumarashok