mirror of
https://github.com/clearlinux/docker.git
synced 2026-08-26 09:36:04 +00:00
Don't set mem soft limit if not specifiecd
You cannot do this for individual cgroups for all the containers. Only set the reservation if the user requested it. The error you will receive is an EINTVAL when you try to set a large limit like we were in the memory limit. Signed-off-by: Michael Crosby <crosbymichael@gmail.com> (cherry picked from commit ecb87ed0a5128a3d9ab3b0a620463b7b56e82bab)
This commit is contained in:
committed by
Tibor Vass
parent
581f297644
commit
c4f0a2aa00
@@ -114,9 +114,6 @@ func (daemon *Daemon) adaptContainerSettings(hostConfig *runconfig.HostConfig, a
|
||||
// By default, MemorySwap is set to twice the size of Memory.
|
||||
hostConfig.MemorySwap = hostConfig.Memory * 2
|
||||
}
|
||||
if hostConfig.MemoryReservation == 0 && hostConfig.Memory > 0 {
|
||||
hostConfig.MemoryReservation = hostConfig.Memory
|
||||
}
|
||||
}
|
||||
|
||||
// verifyPlatformContainerSettings performs platform-specific validation of the
|
||||
|
||||
Reference in New Issue
Block a user