Skip to content

fix(recovery): use pod names for node error recovery - #67

Open
git-jxj wants to merge 1 commit into
BaizeAI:mainfrom
git-jxj:fix/node-recovery-pod-names-20261020
Open

git-jxj wants to merge 1 commit into
BaizeAI:mainfrom
git-jxj:fix/node-recovery-pod-names-20261020

Conversation

@git-jxj

@git-jxj git-jxj commented Oct 20, 2026

Copy link
Copy Markdown

Node error recovery passes Kubeflow job label values to onPodError, which looks up a Pod by name. For a job training with a Pod training-worker-0, that lookup returns NotFound, and the job is never restarted before the node is marked unschedulable.

Return each matching Pod's actual namespace and name. Evaluate every Pod's recovery policy so that a Pod with RestartPolicyNever or without recovery enabled does not hide an eligible sibling. The existing restart ledger keeps recovery to one restart per job and distinguishes jobs with the same name in different namespaces.

The regression tests exercise the node event handler with a fake Kubernetes client, including node and label filtering, multiple Pods per job, namespace isolation, and mixed recovery policies. Keeping Pods available after the fake deletion also verifies ledger deduplication. Before the fix, all five cases that require recovery fail because no restart is requested; after the fix, all six cases pass.

Validation (Go 1.26.9, Helm 3.22.0):

  • Focused node-recovery regression tests
  • make test-all (default and MetaX builds)
  • go test -p 4 -race ./pkg/recovery -count=1
  • go vet -p 4 ./...
  • CGO_ENABLED=0 go build -p 4 ./cmd/kcover
  • make helm-test
  • gofmt and git diff --check

All validation uses local fake clients and static Helm rendering. No cluster or GPU resources are required.

The node error handler passed job label values to onPodError, which
looks up a Pod by name. Jobs with distinct Pod names were skipped
before the node was marked unschedulable.

List every matching Pod with its actual namespace and name. Keep the
existing per-pod recovery policy checks and job restart ledger so an
eligible Pod can trigger recovery without duplicate job restarts.

Signed-off-by: xinjun.jiang <xinjun.jiang@daocloud.io>
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