Skip to content

Commit 6330573

Browse files
samuelkarpk8s-infra-cherrypick-robot
authored andcommitted
cri: move noisy CDI logs to debug level
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 <[email protected]>
1 parent 060aa1d commit 6330573

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

internal/cri/opts/spec_linux.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ func WithCDI(annotations map[string]string, CDIDevices []*runtime.CDIDevice) oci
151151
devices = append(devices, deviceName)
152152
seen[deviceName] = true
153153
}
154-
log.G(ctx).Infof("Container %v: CDI devices from CRI Config.CDIDevices: %v", c.ID, devices)
154+
log.G(ctx).Debugf("Container %v: CDI devices from CRI Config.CDIDevices: %v", c.ID, devices)
155155

156156
// Add devices from CDI annotations
157157
_, devsFromAnnotations, err := cdi.ParseAnnotations(annotations)
@@ -160,7 +160,7 @@ func WithCDI(annotations map[string]string, CDIDevices []*runtime.CDIDevice) oci
160160
}
161161

162162
if devsFromAnnotations != nil {
163-
log.G(ctx).Infof("Container %v: CDI devices from annotations: %v", c.ID, devsFromAnnotations)
163+
log.G(ctx).Debugf("Container %v: CDI devices from annotations: %v", c.ID, devsFromAnnotations)
164164
for _, deviceName := range devsFromAnnotations {
165165
if seen[deviceName] {
166166
// TODO: change to Warning when passing CDI devices as annotations is deprecated

0 commit comments

Comments
 (0)