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
    https://github.com/NVIDIA/nvidia-container-toolkit/commit/179d8655f9b5fce6
    https://github.com/NVIDIA/nvidia-container-toolkit/issues/435

https://github.com/containers/toolbox/pull/1543
This commit is contained in:
Debarshi Ray 2024-09-17 13:58:03 +02:00
parent bd19633a87
commit c386a442f7
1 changed files with 5 additions and 1 deletions

View File

@ -478,7 +478,11 @@ func applyCDISpecForNvidia(spec *specs.Spec) error {
hook.Args[0] != "nvidia-ctk" ||
hook.Args[1] != "hook" ||
hook.Args[2] != "update-ldcache" {
logrus.Debug("Applying Container Device Interface for NVIDIA: unknown hook arguments")
logrus.Debug("Applying Container Device Interface for NVIDIA: unknown hook arguments:")
for _, arg := range hook.Args {
logrus.Debugf("%s", arg)
}
continue
}