NVIDIA / NVIDIA/ai-cloud-validation

ContainerRuntimeCheck: containerd plugin fallback in _gpu_operator_installed is unreachable

Open Beginner friendly
#584 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug priority-2
Dominant language
Python
Stars
27
Forks
33
Avg merge
1d 15h
Merged PRs (30d)
28

Description

Summary

ContainerRuntimeCheck._gpu_operator_installed (isvtest/src/isvtest/validations/host.py) never executes its ctr plugins ls fallback. Hosts that register the NVIDIA runtime only as a containerd plugin — with no matching file under /etc/containerd/ — are reported as nvidia-container-runtime not installed.

Detail

The probe runs:

grep -rl 'nvidia' /etc/containerd/ 2>/dev/null | head -1 ||
ctr plugins ls 2>/dev/null | grep -i nvidia | head -1 ||
echo '__not_configured__'

|| binds looser than |, so this is three pipelines. A pipeline's exit status is its last command's, and head -1 exits 0 on empty input — so the first pipeline always succeeds and neither the ctr plugins ls fallback nor the __not_configured__ sentinel ever runs.

Reproduced against a directory with no matching file:

grep -rl 'nvidia' <dir> 2>/dev/null | head -1   ->  exit=0, empty output
full expression                                 ->  empty output (fallback never reached)

config_out comes back empty, so the method returns False.

Impact

The docstring states the check verifies the runtime is "referenced in the containerd configuration or registered as a containerd plugin". The second condition has never been evaluated. Detection levels 3–5 (containerd / runc / crun + nvidia-container-runtime) fail on correctly configured hosts — the hosts #580 was written to support.

Suggested fix

Collect from both sources, then test the captured output rather than the pipeline status:

{ grep -rl 'nvidia' /etc/containerd/ 2>/dev/null;
  ctr plugins ls 2>/dev/null | grep -i nvidia; } | head -1 | grep . || echo '__not_configured__'

grep . exits non-zero on empty input, so the sentinel fires correctly. Verified across four cases: config file only, plugin only, neither, and missing /etc/containerd/.

Notes

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in isvtest/src/isvtest/validations/host.py at ContainerRuntimeCheck._gpu_operator_installed, then reproduce the probe with config-only, plugin-only, neither, and missing-directory cases. Check that the containerd plugin fallback is evaluated and that the method distinguishes configured hosts from the not_configured sentinel.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, shell
Domain
devops, infrastructure
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
76/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.