Skip to content

Commit

Permalink
Merge pull request #10507 from afbjorklund/docker-memswap
Browse files Browse the repository at this point in the history
Stop using --memory-swap if it is not available
  • Loading branch information
medyagh authored Feb 18, 2021
2 parents 92e6100 + eabc02d commit 75be14d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/drivers/kic/oci/oci.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,10 @@ func CreateContainerNode(p CreateParams) error {
runArgs = append(runArgs, "--security-opt", "apparmor=unconfined")

runArgs = append(runArgs, fmt.Sprintf("--memory=%s", p.Memory))
// Disable swap by setting the value to match
runArgs = append(runArgs, fmt.Sprintf("--memory-swap=%s", p.Memory))
if memcgSwap {
// Disable swap by setting the value to match
runArgs = append(runArgs, fmt.Sprintf("--memory-swap=%s", p.Memory))
}

virtualization = "docker" // VIRTUALIZATION_DOCKER
}
Expand Down

0 comments on commit 75be14d

Please sign in to comment.