Merge pull request #3187 from hashicorp/b-windows-docker

Fix MemorySwappiness on Windows Docker
This commit is contained in:
Alex Dadgar 2017-09-11 09:56:49 -07:00 committed by GitHub
commit b3958faa14

View file

@ -973,8 +973,11 @@ func (d *DockerDriver) createContainerConfig(ctx *ExecContext, task *structs.Tas
VolumeDriver: driverConfig.VolumeDriver,
}
// Windows does not support MemorySwap #2193
if runtime.GOOS != "windows" {
// Windows does not support MemorySwap/MemorySwappiness #2193
if runtime.GOOS == "windows" {
hostConfig.MemorySwap = 0
hostConfig.MemorySwappiness = -1
} else {
hostConfig.MemorySwap = memLimit // MemorySwap is memory + swap.
}