aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Heon <mheon@redhat.com>2020-01-23 09:06:32 -0500
committerMatthew Heon <mheon@redhat.com>2020-01-23 09:46:11 -0500
commiteb229d526c04f17ca8b7e65abba745fd5b465a6c (patch)
tree771898eb33f33644a835129eab7734534282e762
parent6518421f89e2e953f918d35e44d3d8d7299e06a8 (diff)
downloadpodman-eb229d526c04f17ca8b7e65abba745fd5b465a6c.tar.gz
podman-eb229d526c04f17ca8b7e65abba745fd5b465a6c.tar.bz2
podman-eb229d526c04f17ca8b7e65abba745fd5b465a6c.zip
Default CPUShares in Inspect are 1024
This is purely a display change - we weren't initializing the default value to display for the CPUShares field, which defaults to 1024. Fixes #4822 Signed-off-by: Matthew Heon <mheon@redhat.com>
-rw-r--r--libpod/container_inspect.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/libpod/container_inspect.go b/libpod/container_inspect.go
index 01f2d93bd..641bc8a91 100644
--- a/libpod/container_inspect.go
+++ b/libpod/container_inspect.go
@@ -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.