Skip to content

Commit 24427cb

Browse files
remove debug logs
1 parent 62bd6c0 commit 24427cb

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

runsc/cgroup/cgroup_v2.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -536,15 +536,11 @@ func (*memory2) generateProperties(spec *specs.LinuxResources) ([]dbus.Property,
536536
}
537537

538538
func (*memory2) set(spec *specs.LinuxResources, path string) error {
539-
log.Debugf("spec: %v", spec)
540539
if spec == nil || spec.Memory == nil {
541540
return nil
542541
}
543542

544-
log.Debugf("nil: %v", spec.Memory.Swap == nil)
545-
546543
if spec.Memory.Swap != nil {
547-
log.Debugf("swap: %v", *spec.Memory.Swap)
548544
// in cgroup v2, we set memory and swap separately, but the spec specifies
549545
// Swap field as memory+swap, so we need memory limit here to be set in
550546
// order to get the correct swap value.
@@ -554,11 +550,9 @@ func (*memory2) set(spec *specs.LinuxResources, path string) error {
554550

555551
swap, err := convertMemorySwapToCgroupV2Value(*spec.Memory.Swap, *spec.Memory.Limit)
556552
if err != nil {
557-
return nil
553+
return err
558554
}
559-
log.Debugf("swap: %v", swap)
560555
swapStr := numToStr(swap)
561-
log.Debugf("swapStr: %v", swapStr)
562556
// memory and memorySwap set to the same value -- disable swap
563557
if swapStr == "" && swap == 0 && *spec.Memory.Swap > 0 {
564558
swapStr = "0"

0 commit comments

Comments
 (0)