Skip to content

Commit c918c70

Browse files
committed
cmd/initContainer: Log unknown Container Device Interface hook arguments
NVIDIA Container Toolkit 0.16.0 changed the hook arguments in the Container Device Interface specification generated by it [1]. Having the unknown hook arguments show up in the debug logs makes it easier to understand what happened. [1] NVIDIA Container Toolkit commit 179d8655f9b5fce6 NVIDIA/nvidia-container-toolkit@179d8655f9b5fce6 NVIDIA/nvidia-container-toolkit#435
1 parent 07384d4 commit c918c70

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/cmd/initContainer.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,11 @@ func applyCDISpecForNvidia(spec *specs.Spec) error {
478478
hook.Args[0] != "nvidia-ctk" ||
479479
hook.Args[1] != "hook" ||
480480
hook.Args[2] != "update-ldcache" {
481-
logrus.Debug("Applying Container Device Interface for NVIDIA: unknown hook arguments")
481+
logrus.Debug("Applying Container Device Interface for NVIDIA: unknown hook arguments:")
482+
for _, arg := range hook.Args {
483+
logrus.Debugf("%s", arg)
484+
}
485+
482486
continue
483487
}
484488

0 commit comments

Comments
 (0)