From eb229d526c04f17ca8b7e65abba745fd5b465a6c Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Thu, 23 Jan 2020 09:06:32 -0500 Subject: 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 --- libpod/container_inspect.go | 3 +++ 1 file changed, 3 insertions(+) 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. -- cgit v1.2.3-54-g00ecf