Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
container: when doing update, make sure to check cpuset
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Ernst <eric@amperecomputing.com>
  • Loading branch information
Eric Ernst committed Jun 29, 2020
1 parent 86d0295 commit 9d442d3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions virtcontainers/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -1249,6 +1249,12 @@ func (c *Container) update(resources specs.LinuxResources) error {
if q := cpu.Quota; q != nil && *q != 0 {
c.config.Resources.CPU.Quota = q
}
if cpu.Cpus != "" {
c.config.Resources.CPU.Cpus = cpu.Cpus
}
if cpu.Mems != "" {
c.config.Resources.CPU.Mems = cpu.Mems
}
}

if c.config.Resources.Memory == nil {
Expand Down

0 comments on commit 9d442d3

Please sign in to comment.