mirror of
https://github.com/kemko/nomad.git
synced 2026-01-08 11:25:41 +03:00
Fix MemorySwappiness on Windows Docker
Fixes https://github.com/hashicorp/nomad/issues/3181
This commit is contained in:
@@ -970,8 +970,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.
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user