Conversation
…navailable Discovering the links between devices enumerates every physical GPU on the node, including devices that have been marked unhealthy and are therefore absent from the available devices supplied by kubelet. A GPU that has fallen off the bus makes that discovery fail, and returning an error from GetPreferredAllocation then fails admission for every GPU pod on the node, including single-device allocations that the healthy devices could satisfy. Pods owned by a controller are recreated indefinitely as a result. Fall back to an allocation that does not consider the topology instead. The fallback selects only from the available devices, always includes the required ones, and still returns an error when the request cannot be satisfied. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Ieere Song <sirzzang@naver.com>
10 tasks
|
Thanks for the contribution. We will review this PR soon. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Closes #2038.
On a node that exposes whole GPUs,
GetPreferredAllocationtakes the aligned path, and that path builds the link information for all physical devices before theavailablelist is applied. A device that has fallen off the bus (Xid 79) therefore makes the call fail even though the health check has already marked it unhealthy and kubelet no longer offers it inavailable. The error becomes an admission failure for every GPU pod on the node, including single-device allocations that the remaining healthy devices could satisfy, and pods owned by a controller are recreated indefinitely: on the cluster where we hit this, one Deployment produced roughly a thousandUnexpectedAdmissionErrorpods every five minutes for three days.This turns that failure into a degraded allocation instead. When link discovery fails, log a warning and select devices without considering the topology.
unalignedAllocselects only fromavailable, always includesrequired, de-duplicates both, and still returns an error when the request cannot be satisfied — a negative size, more distinct required devices than the allocation size, a required device that is not available, or not enough distinct available devices.The change is deliberately narrow and orthogonal to health reporting: no device is marked healthy or unhealthy, NVML initialisation policy is unchanged, and the aligned path is untouched whenever link discovery succeeds.
#2038 also proposes the more complete fix — enumerating only the candidate devices in
go-gpuallocatorso that a lost device is never touched. The two compose rather than compete: once that lands, this class of failure no longer reaches the fallback, which then only covers other reasons link discovery can fail. I am happy to follow whichever direction you prefer, including going straight to that one instead.Checklist
make lint)make test)make check-modules)make check-third-party-notices)Testing
Unit tests only — the hardware fault is not reproducible on demand.
internal/rm/nvml_manager_fallback_test.goinjects a minimalnvml.Interfaceandnvml.Devicetest double, in the same style asfakeNvmlLibininternal/rm/health_test.goand without adding a dependency. It reports four devices but returnsERROR_GPU_IS_LOSTfor the handle of one of them, and only the three healthy IDs are passed asavailable, which is the state kubelet is in once the health check has removed the lost device.This is also the first test to execute the aligned path:
TestFullGPUNodeIgnoresAllocationPolicycurrently notes that it can only check the branch condition "since alignedAlloc requires NVML".I checked that the tests actually discriminate the change:
With the fallback — all cases pass: five subtests for the allocation path (single device, required devices included, the lost device is never allocated, the first device having fallen off the bus, allocating more devices than are available still fails) and ten table cases for
unalignedAlloc.Reverting only the call site while keeping the helper brings the failures back, and the boundary case ("allocating more devices than are available still fails") passes in both directions.
Local results on this branch: