Skip to content

Commit 1fde8c4

Browse files
crazy-maxvvoland
authored andcommitted
builder-next: fix cdi manager
Signed-off-by: CrazyMax <[email protected]> Signed-off-by: Paweł Gronowski <[email protected]>
1 parent cde9f07 commit 1fde8c4

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

builder/builder-next/controller.go

+3-5
Original file line numberDiff line numberDiff line change
@@ -549,10 +549,7 @@ func getCDIManager(specDirs []string) (*cdidevices.Manager, error) {
549549
return nil, nil
550550
}
551551
cdiCache, err := func() (*cdi.Cache, error) {
552-
cdiCache, err := cdi.NewCache(
553-
cdi.WithSpecDirs(specDirs...),
554-
cdi.WithAutoRefresh(false),
555-
)
552+
cdiCache, err := cdi.NewCache(cdi.WithSpecDirs(specDirs...))
556553
if err != nil {
557554
return nil, err
558555
}
@@ -564,5 +561,6 @@ func getCDIManager(specDirs []string) (*cdidevices.Manager, error) {
564561
if err != nil {
565562
return nil, errors.Wrapf(err, "CDI registry initialization failure")
566563
}
567-
return cdidevices.NewManager(cdiCache), nil
564+
// TODO: add support for auto-allowed devices from config
565+
return cdidevices.NewManager(cdiCache, nil), nil
568566
}

0 commit comments

Comments
 (0)