Merge branch 'fix-cdi-refresh' into 'main'

Ensure that CDI registry is refreshed

See merge request nvidia/container-toolkit/container-toolkit!191
This commit is contained in:
Evan Lezar 2022-07-13 09:38:45 +00:00
commit f9547c447a

View File

@ -101,8 +101,8 @@ func (m cdiModifier) Modify(spec *specs.Spec) error {
cdi.WithSpecDirs(m.specDirs...),
cdi.WithAutoRefresh(false),
)
if errs := registry.GetErrors(); len(errs) > 0 {
m.logger.Debugf("The following errors were triggered when creating the CDI registry: %v", errs)
if err := registry.Refresh(); err != nil {
m.logger.Debugf("The following error was triggered when refreshing the CDI registry: %v", err)
}
devices := m.devices