Repository navigation
fix(api): do not count DRA admin access GPU claims as GPU usage - #26
Open
brokenlander wants to merge 1 commit into
Open
brokenlander wants to merge 1 commit into
brokenlander wants to merge 1 commit into
Conversation
Signed-off-by: brokenlander <94259413+brokenlander@users.noreply.github.com>
brokenlander
force-pushed
the
fix/dra-admin-access-gpu-count
branch
from
October 14, 2026 00:51
f6fbe07 to
de6d620
Compare
3 of 4 tasks
davidLif
approved these changes
Oct 14, 2026
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
DRA claims with
adminAccess: truedo not consume a device: the API lets them share a device with a regular allocation, and kube-scheduler's allocated-device tracking skips them. The GPU helpers here counted them anyway. The NVIDIA GPU Operator in DRA mode keeps admin access claims on every GPU node (DRA validator, DCGM exporter), so in KAI a one-GPU node looked fully used and every GPU pod was rejected withdidn't have enough resources: GPUs.countGPUDevicesFromClaimandgetGPUDeviceClassNameFromClaimnow skip requests withAdminAccessset, through oneisGPUConsumingRequestcheck. That carries throughExtractDRAGPUResourcesFromClaimsandDRAGPUResourceListFromClaims, which KAI uses for the pod's GPU request and the podgroup's requested and allocated resources.This is the
dra.gohalf of kai-scheduler/KAI-Scheduler#2237, moved here as asked in that PR. The other half (dra_shared_device_info.go) stays in KAI and goes in with the module bump.Related Issues
Part of kai-scheduler/KAI-Scheduler#2236
Checklist
make changelog(or applied theskip-changeloglabel). Do not editCHANGELOG.mddirectly; pending fragments are folded into it at release time.Breaking Changes
None. Claims without admin access are counted as before.
Additional Notes
Tests in
dra_gpu_test.go:ExactCountandAlladmin requests count 0, a mixed claim counts only its regular request, and admin claims are left out ofExtractDRAGPUResourcesFromClaimsandDRAGPUResourceListFromClaims. They fail on main and pass with the fix.Checked against KAI main (049d1ba6, on v0.2.0) with a
replacepointing at this branch: the tests from kai-scheduler/KAI-Scheduler#2237 innode_infoandpod_infopass. With thereplacepointing at unpatched main, the two admin access tests innode_infofail.make validateandmake testpass, andgo mod tidyleaves go.mod unchanged.