Skip to content

Commit b585ff1

Browse files
committed
cri: memory.memsw.limit_in_bytes: no such file or directory
If kubelet passes the swap limit (default memory limit = swap limit ), it is configured for container irrespective if the node supports swap. Signed-off-by: Qasim Sarfraz <[email protected]> (cherry picked from commit 06f18c6) Signed-off-by: Qasim Sarfraz <[email protected]>
1 parent 62f6b96 commit b585ff1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pkg/cri/opts/spec_linux.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ func WithResources(resources *runtime.LinuxContainerResources, tolerateMissingHu
484484
s.Linux.Resources.Memory.Swap = &limit
485485
}
486486
}
487-
if swapLimit != 0 {
487+
if swapLimit != 0 && SwapControllerAvailable() {
488488
s.Linux.Resources.Memory.Swap = &swapLimit
489489
}
490490

0 commit comments

Comments
 (0)