]> git.feebdaed.xyz Git - 0xmirror/containerd.git/commitdiff
cri: move noisy CDI logs to debug level
authorSamuel Karp <samuelkarp@google.com>
Fri, 19 Dec 2025 19:42:08 +0000 (11:42 -0800)
committerSamuel Karp <samuelkarp@google.com>
Fri, 19 Dec 2025 19:42:08 +0000 (11:42 -0800)
WithCDI currently emits logs at Info level for every container even when
len(Config.CDIDevices) == 0.  Move these to Debug level.

Signed-off-by: Samuel Karp <samuelkarp@google.com>
internal/cri/opts/spec_linux.go

index 712c080cffd345eb9592e6ae483d69b17d2a1ad9..13e1cd296964a8691d84bc843af16456180ab37b 100644 (file)
@@ -151,7 +151,7 @@ func WithCDI(annotations map[string]string, CDIDevices []*runtime.CDIDevice) oci
                        devices = append(devices, deviceName)
                        seen[deviceName] = true
                }
-               log.G(ctx).Infof("Container %v: CDI devices from CRI Config.CDIDevices: %v", c.ID, devices)
+               log.G(ctx).Debugf("Container %v: CDI devices from CRI Config.CDIDevices: %v", c.ID, devices)
 
                // Add devices from CDI annotations
                _, devsFromAnnotations, err := cdi.ParseAnnotations(annotations)
@@ -160,7 +160,7 @@ func WithCDI(annotations map[string]string, CDIDevices []*runtime.CDIDevice) oci
                }
 
                if devsFromAnnotations != nil {
-                       log.G(ctx).Infof("Container %v: CDI devices from annotations: %v", c.ID, devsFromAnnotations)
+                       log.G(ctx).Debugf("Container %v: CDI devices from annotations: %v", c.ID, devsFromAnnotations)
                        for _, deviceName := range devsFromAnnotations {
                                if seen[deviceName] {
                                        // TODO: change to Warning when passing CDI devices as annotations is deprecated