зеркало из https://github.com/microsoft/docker.git
Merge pull request #11454 from hqhq/fix_memoryswap_warning
do not warning when we disable memoryswap
This commit is contained in:
Коммит
b6e20a67f9
|
@ -33,7 +33,7 @@ func (daemon *Daemon) ContainerCreate(job *engine.Job) engine.Status {
|
|||
job.Errorf("Your kernel does not support memory limit capabilities. Limitation discarded.\n")
|
||||
hostConfig.Memory = 0
|
||||
}
|
||||
if hostConfig.Memory > 0 && !daemon.SystemConfig().SwapLimit {
|
||||
if hostConfig.Memory > 0 && hostConfig.MemorySwap != -1 && !daemon.SystemConfig().SwapLimit {
|
||||
job.Errorf("Your kernel does not support swap limit capabilities. Limitation discarded.\n")
|
||||
hostConfig.MemorySwap = -1
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче