Skip to content

Commit 06f18c6

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]>
1 parent 4d2c887 commit 06f18c6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pkg/cri/opts/spec_linux_opts.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ func WithResources(resources *runtime.LinuxContainerResources, tolerateMissingHu
329329
s.Linux.Resources.Memory.Swap = &limit
330330
}
331331
}
332-
if swapLimit != 0 {
332+
if swapLimit != 0 && SwapControllerAvailable() {
333333
s.Linux.Resources.Memory.Swap = &swapLimit
334334
}
335335

0 commit comments

Comments
 (0)