Bump tags.cncf.io/container-device-interface to v0.7.1

This includes migrating from cdi.GetRegistry() to cdi.Configure() and
using top-level cdi Refresh and InjectDevices functions as applicable.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
Evan Lezar
2024-04-05 17:13:39 +02:00
parent ac8f7698cf
commit 1b62224181
19 changed files with 278 additions and 149 deletions

View File

@@ -465,8 +465,8 @@ func getNetNSPath(_ gocontext.Context, task containerd.Task) (string, error) {
// It also provides a way to override the CDI spec file paths if required.
func withStaticCDIRegistry() oci.SpecOpts {
return func(ctx gocontext.Context, _ oci.Client, _ *containers.Container, s *oci.Spec) error {
registry := cdi.GetRegistry(cdi.WithAutoRefresh(false))
if err := registry.Refresh(); err != nil {
_ = cdi.Configure(cdi.WithAutoRefresh(false))
if err := cdi.Refresh(); err != nil {
// We don't consider registry refresh failure a fatal error.
// For instance, a dynamically generated invalid CDI Spec file for
// any particular vendor shouldn't prevent injection of devices of