mirror of
https://github.com/containerd/containerd.git
synced 2026-08-12 22:16:27 +00:00
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 <qasimsarfraz@microsoft.com>
(cherry picked from commit 06f18c69d2)
Signed-off-by: Qasim Sarfraz <qasimsarfraz@microsoft.com>
This commit is contained in:
@@ -330,7 +330,7 @@ func WithResources(resources *runtime.LinuxContainerResources, tolerateMissingHu
|
||||
s.Linux.Resources.Memory.Swap = &limit
|
||||
}
|
||||
}
|
||||
if swapLimit != 0 {
|
||||
if swapLimit != 0 && SwapControllerAvailable() {
|
||||
s.Linux.Resources.Memory.Swap = &swapLimit
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user