From 658960c97b0dca06cb81472bc9bd7ff820fc56cf Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Tue, 3 May 2022 17:24:15 +0200 Subject: build(deps) bump CDI dependency from 0.4.0 to 0.5.0 bump github.com/container-orchestrated-devices/container-device-interface from 0.4.0 to 0.5.0 This requires that the cdi.Registry be instantiated with AutoRefresh disabled for CLI clients. [NO NEW TESTS NEEDED] Signed-off-by: Evan Lezar --- libpod/container_internal_linux.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'libpod') diff --git a/libpod/container_internal_linux.go b/libpod/container_internal_linux.go index a131ab367..64e0af284 100644 --- a/libpod/container_internal_linux.go +++ b/libpod/container_internal_linux.go @@ -872,9 +872,11 @@ func (c *Container) generateSpec(ctx context.Context) (*spec.Spec, error) { // Warning: CDI may alter g.Config in place. if len(c.config.CDIDevices) > 0 { - registry := cdi.GetRegistry() - if errs := registry.GetErrors(); len(errs) > 0 { - logrus.Debugf("The following errors were triggered when creating the CDI registry: %v", errs) + registry := cdi.GetRegistry( + cdi.WithAutoRefresh(false), + ) + if err := registry.Refresh(); err != nil { + logrus.Debugf("The following error was triggered when refreshing the CDI registry: %v", err) } _, err := registry.InjectDevices(g.Config, c.config.CDIDevices...) if err != nil { -- cgit v1.2.3-54-g00ecf