Skip to content

docs: use the resource names the plugin advertises in examples - #222

Open
fjvbn2003 wants to merge 2 commits into
NVIDIA:masterfrom
fjvbn2003:docs-resource-names-uppercase
Open

fjvbn2003 wants to merge 2 commits into
NVIDIA:masterfrom
fjvbn2003:docs-resource-names-uppercase

Conversation

@fjvbn2003

@fjvbn2003 fjvbn2003 commented Oct 16, 2026 •

Copy link
Copy Markdown

The example KubeVirt CR and VMIs use mixed-case resource names such as nvidia.com/TU104GL_Tesla_T4 and nvidia.com/GP102GL_Tesla_P40. Since 3b4d73f ("convert device names to capital letters", 2022) the plugin registers passthrough GPUs in upper case, for example nvidia.com/TU104GL_TESLA_T4. Extended resource names are case sensitive, so a VM copied from the examples requests a resource that no node advertises and stays Pending with Insufficient nvidia.com/.... This looks like what #89 ran into: the plugin log shows GK110BGL_TESLA_K40M and the scheduler reports Insufficient nvidia.com/GK110BGL_Tesla_K40m.

The vGPU example also requested the passthrough resource of a P40 instead of the vGPU type that the example CR allows (nvidia.com/GRID_T4-1Q).

Changes:

  • examples/kubevirt-featuregate-cm.yaml, examples/vmi-gpu.yaml: use the upper-case names.
  • examples/vmi-vgpu.yaml: request nvidia.com/GRID_T4-1Q, which matches the mediatedDevices entry of the example CR.
  • README.md: describe how the plugin derives resource names, and how to list them on a node.

How I checked the names: I called getDeviceName() from pkg/device_plugin on the pci.ids shipped with Ubuntu 26.04, and readVgpuIDFromFileFunc() on a name file containing GRID T4-1Q, with a throwaway test that is not part of this PR:

10de:1eb8 -> nvidia.com/TU104GL_TESLA_T4
10de:1b38 -> nvidia.com/GP102GL_TESLA_P40
10de:2560 -> nvidia.com/GA106M_GEFORCE_RTX_3060_MOBILE___MAXQ
mdev type name "GRID T4-1Q" -> nvidia.com/GRID_T4-1Q

go test ./pkg/... passes. This PR only changes docs and examples. I have not deployed the plugin itself on a cluster for this PR.

Related: #89.

Prepared with help from Claude (AI), including the local checks described above.

🤖 Generated with Claude Code

Since "convert device names to capital letters" (3b4d73f, 2022) the
plugin registers passthrough GPUs as nvidia.com/<PCI.IDS NAME IN UPPER
CASE>, for example nvidia.com/TU104GL_TESLA_T4. The example KubeVirt CR
and VMI still use the old mixed-case names (nvidia.com/TU104GL_Tesla_T4,
nvidia.com/GP102GL_Tesla_P40). Extended resource names are case
sensitive, so a VM copied from the examples requests a resource that no
node has and stays Pending with "Insufficient nvidia.com/..." (see NVIDIA#89).

The vGPU example also requested the passthrough resource of a P40
instead of the vGPU type that the example CR allows.

Use the advertised names in the examples, and describe in the README how
the names are derived and how to list them on a node.

Signed-off-by: YoungjuKim <[email protected]>
@copy-pr-bot

copy-pr-bot Bot commented Oct 16, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@rajatchopra rajatchopra left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Correct.
Just concerned about bloated documentation. Could be squeezed I suspect.

Keep only what a user needs to get the name right: names are case
sensitive, an example of each form, and where to look them up on a
node.

Signed-off-by: YoungjuKim <[email protected]>
@fjvbn2003

Copy link
Copy Markdown
Author

Thanks, agreed. In 169539a I cut the README addition from 9 lines to 2: names are case sensitive, one passthrough and one vGPU example, and where to check them on a node (.status.allocatable). I checked the wording against the conversion in device_plugin.go (lines 418-428). The example fixes are unchanged, and go test ./pkg/... passes locally.

(Written with help from Claude (AI).)

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