improve CDI logging

Added logging of found CDI devices.
Fixed test failures caused by the change.

Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
This commit is contained in:
Ed Bartosh
2022-10-12 13:43:13 +03:00
parent 8ed910c46a
commit 643dc16565
3 changed files with 8 additions and 2 deletions

View File

@@ -743,6 +743,8 @@ func WithCDI(annotations map[string]string) oci.SpecOpts {
return nil
}
log.G(ctx).Infof("container %v: CDI devices: %v", c.ID, cdiDevices)
registry := cdi.GetRegistry()
if err = registry.Refresh(); err != nil {
// We don't consider registry refresh failure a fatal error.