Repository navigation
Conversation
When the host has nvidia-smi but it cannot talk to the driver (for example after the driver packages were upgraded without a reboot, so the user-space libraries and the loaded kernel module differ), the driver-validation init container logs: No pre-installed driver detected on the host: exit status 18 ... failed to validate the driver, retrying after 5 seconds\n and then retries the driver container path forever. Both lines point away from the real problem: a driver is installed on the host, and the retry warning never says what failed (it also prints a literal "\n"). - validateHostDriver: when nvidia-smi was found on the host but failed to run, return an error that says so and names the binary. - runValidation: log "No usable pre-installed driver detected" instead of "No pre-installed driver detected". - validateDriverContainer: include the error in the retry warning and drop the trailing "\n". No change in control flow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: YoungjuKim <fjvbn2003@gmail.com>
📝 Walkthrough
Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: 🔵 Low · up to
|
There was a problem hiding this comment.
Note
Quiet mode is enabled, so only the most important comments were posted inline. Other review comments are grouped below.
🟡 Other comments: 1
cmd/nvidia-validator/main.go: 1
803-803: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winCarry the host validation error into the retry warning.
With
WITH_WAIT=true, this warning formats the separate container-validation error.Driver.runValidationhas the hostnvidia-smiexecution error, but the retry path does not receive it. This omits the underlying host error required by issue#3085. Pass the host error into the container retry path and include both errors in the warning.
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository: NVIDIA/gpu-operator/.coderabbit.yaml
- Review profile: QUIET
- Plan: Enterprise
- Run ID:
36d15131-7599-43d7-a71c-706a25d4eff3
📒 Files selected for processing: 1
cmd/nvidia-validator/main.go
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.
|
@coderabbitai Thanks. The host error is not lost: (measured with a fake This reply was drafted with AI assistance and reviewed by me. |
|
Tip For best results, initiate chat on the files or code changes. @fjvbn2003 The supplied log shows that ✏️ Learnings added
You are interacting with an AI system. |
Description
When a node has a pre-installed driver (
driver.enabled=false) andnvidia-smion the host cannot talk to the driver, for example after the driver packages were upgraded without a reboot, thedriver-validationinit container logs:and stays in
Initforever. Both log lines point away from the problem. A driver is installed on the host, and the retry warning never says what failed (it also prints a literal\n). #1276 and #1687 show users stuck on the same retry line without a reason.This PR:
validateHostDriver: whennvidia-smiwas found on the host but failed, returnfound '<path>' on the host, but running it failed: <err>.runValidation: logNo usable pre-installed driver detected on the host: ...instead ofNo pre-installed driver detected ....validateDriverContainer: include the error in the retry warning and drop the trailing\n.Control flow does not change. Validation still falls through to the driver container path, which is still needed when the host has a stray
nvidia-smibut the driver comes from the driver container.This overlaps with #3034 on the retry warning line. If #3034 merges first, I will rebase and move the error into the warning in
waitForDriver.Checklist
make lint) (golangci-lint not available locally;gofmt -sandgo vetwithGOOS=linuxare clean)make validate-generated-assets) (no generated files changed)make validate-modules) (no module changes)validateHostDriverchroots into/host, so it is not unit-testable without a refactor)Testing
go test ./cmd/nvidia-validator/passes.nvidia-operator-validatorservice account./hostwas a fake root whose/usr/bin/nvidia-smiprintsFailed to initialize NVML: Driver/library version mismatchand exits with 18. The run usedWITH_WAIT=true,--component driver, and a 12s timeout, and I ran it once with themainbinary and once with the patched binary, both built from the same commit (CGO_ENABLED=0 GOOS=linux).Before (
main):After:
This change was drafted with AI assistance and reviewed by me.
Fixes #3085
🤖 Generated with Claude Code