Skip to content

Commit

Permalink
Default CPUShares in Inspect are 1024
Browse files Browse the repository at this point in the history
This is purely a display change - we weren't initializing the
default value to display for the CPUShares field, which defaults
to 1024.

Fixes containers#4822

Signed-off-by: Matthew Heon <mheon@redhat.com>
  • Loading branch information
mheon committed Jan 23, 2020
1 parent 34429f3 commit a6a1015
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libpod/container_inspect.go
Original file line number Diff line number Diff line change
Expand Up @@ -1014,6 +1014,9 @@ func (c *Container) generateInspectContainerHostConfig(ctrSpec *spec.Spec, named
hostConfig.ShmSize = c.config.ShmSize
hostConfig.Runtime = "oci"

// Default CPUShares is 1024, but we may overwrite below.
hostConfig.CpuShares = 1024

// This is very expensive to initialize.
// So we don't want to initialize it unless we absolutely have to - IE,
// there are things that require a major:minor to path translation.
Expand Down

0 comments on commit a6a1015

Please sign in to comment.