mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-25 05:21:33 +00:00
Improve error reporting for cdi list
Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
parent
b6ab444529
commit
bab4ec30af
@ -1,5 +1,7 @@
|
|||||||
# NVIDIA Container Toolkit Changelog
|
# NVIDIA Container Toolkit Changelog
|
||||||
|
|
||||||
|
* Add a `--spec-dir` option to the `nvidia-ctk cdi generate` command. This allows specs outside of `/etc/cdi` and `/var/run/cdi` to be processed.
|
||||||
|
|
||||||
## v1.15.0-rc.3
|
## v1.15.0-rc.3
|
||||||
* Fix bug in `nvidia-ctk hook update-ldcache` where default `--ldconfig-path` value was not applied.
|
* Fix bug in `nvidia-ctk hook update-ldcache` where default `--ldconfig-path` value was not applied.
|
||||||
|
|
||||||
|
@ -86,12 +86,16 @@ func (m command) run(c *cli.Context, cfg *config) error {
|
|||||||
return fmt.Errorf("failed to create CDI cache: %v", err)
|
return fmt.Errorf("failed to create CDI cache: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
refreshErr := registry.Refresh()
|
_ = registry.Refresh()
|
||||||
|
if errors := registry.GetErrors(); len(errors) > 0 {
|
||||||
|
m.logger.Warningf("The following registry errors were reported:")
|
||||||
|
for k, err := range errors {
|
||||||
|
m.logger.Warningf("%v: %v", k, err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
devices := registry.ListDevices()
|
devices := registry.ListDevices()
|
||||||
m.logger.Infof("Found %d CDI devices", len(devices))
|
m.logger.Infof("Found %d CDI devices", len(devices))
|
||||||
if refreshErr != nil {
|
|
||||||
m.logger.Warningf("Refreshing the CDI registry returned the following error(s): %v", refreshErr)
|
|
||||||
}
|
|
||||||
for _, device := range devices {
|
for _, device := range devices {
|
||||||
fmt.Printf("%s\n", device)
|
fmt.Printf("%s\n", device)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user