daemon: CDI: fix missing error in logs

The log would log an info about skipping a missing directory together
with a "not found" error (which was redundant), but discard the error
for other problems.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn committed 2026-02-21 21:43:11 +01:00
1 parent f4ae09bf39
commit 71b5e2cc7d
1 file changed
+2 -2
+2 -2
View File
@@ -85,10 +85,10 @@ func createCDICache(cdiSpecDirs ...string) (*cdi.Cache, error) {
for dir, errs := range cache.GetErrors() {
for _, err := range errs {
if errors.Is(err, os.ErrNotExist) {
log.L.WithField("dir", dir).Infof("CDI directory does not exist, skipping: %v", err)
log.L.WithField("dir", dir).Info("CDI directory does not exist, skipping")
continue
}
log.L.WithField("dir", dir).Warnf("CDI setup error: %+v", err)
log.L.WithFields(log.Fields{"error": err, "dir": dir}).Warn("CDI setup error")
}
}