Merge pull request #4952 from mheon/inspect_default_shares

Default CPUShares in Inspect are 1024
This commit is contained in:
OpenShift Merge Robot 2020-01-25 23:12:57 -08:00 committed by GitHub
commit c1e2698f81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -1014,6 +1014,9 @@ func (c *Container) generateInspectContainerHostConfig(ctrSpec *spec.Spec, named
hostConfig.ShmSize = c.config.ShmSize hostConfig.ShmSize = c.config.ShmSize
hostConfig.Runtime = "oci" hostConfig.Runtime = "oci"
// Default CPUShares is 1024, but we may overwrite below.
hostConfig.CpuShares = 1024
// This is very expensive to initialize. // This is very expensive to initialize.
// So we don't want to initialize it unless we absolutely have to - IE, // 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. // there are things that require a major:minor to path translation.