mirror of
https://github.com/kemko/nomad.git
synced 2026-01-04 09:25:46 +03:00
Fix docker driver MemorySwap value
Fixes an incorrect value being assigned to MemorySwap when `memory_hard_limit` flag is being used. Issue raised in https://github.com/hashicorp/nomad/issues/8153
This commit is contained in:
@@ -838,7 +838,7 @@ func (d *Driver) createContainerConfig(task *drivers.TaskConfig, driverConfig *T
|
||||
hostConfig.MemorySwap = 0
|
||||
hostConfig.MemorySwappiness = nil
|
||||
} else {
|
||||
hostConfig.MemorySwap = task.Resources.LinuxResources.MemoryLimitBytes // MemorySwap is memory + swap.
|
||||
hostConfig.MemorySwap = memory
|
||||
|
||||
// disable swap explicitly in non-Windows environments
|
||||
var swapiness int64 = 0
|
||||
|
||||
Reference in New Issue
Block a user