mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
info: unset cgroup-related fields when CgroupDriver == none
Fix issue 42151
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
(cherry picked from commit 039e9670cb
)
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
This commit is contained in:
parent
d9b2f4d0c8
commit
0e76a0a418
1 changed files with 12 additions and 10 deletions
|
@ -25,16 +25,18 @@ func (daemon *Daemon) fillPlatformInfo(v *types.Info, sysInfo *sysinfo.SysInfo)
|
|||
v.CgroupVersion = "2"
|
||||
}
|
||||
|
||||
v.MemoryLimit = sysInfo.MemoryLimit
|
||||
v.SwapLimit = sysInfo.SwapLimit
|
||||
v.KernelMemory = sysInfo.KernelMemory
|
||||
v.KernelMemoryTCP = sysInfo.KernelMemoryTCP
|
||||
v.OomKillDisable = sysInfo.OomKillDisable
|
||||
v.CPUCfsPeriod = sysInfo.CPUCfs
|
||||
v.CPUCfsQuota = sysInfo.CPUCfs
|
||||
v.CPUShares = sysInfo.CPUShares
|
||||
v.CPUSet = sysInfo.Cpuset
|
||||
v.PidsLimit = sysInfo.PidsLimit
|
||||
if v.CgroupDriver != cgroupNoneDriver {
|
||||
v.MemoryLimit = sysInfo.MemoryLimit
|
||||
v.SwapLimit = sysInfo.SwapLimit
|
||||
v.KernelMemory = sysInfo.KernelMemory
|
||||
v.KernelMemoryTCP = sysInfo.KernelMemoryTCP
|
||||
v.OomKillDisable = sysInfo.OomKillDisable
|
||||
v.CPUCfsPeriod = sysInfo.CPUCfs
|
||||
v.CPUCfsQuota = sysInfo.CPUCfs
|
||||
v.CPUShares = sysInfo.CPUShares
|
||||
v.CPUSet = sysInfo.Cpuset
|
||||
v.PidsLimit = sysInfo.PidsLimit
|
||||
}
|
||||
v.Runtimes = daemon.configStore.GetAllRuntimes()
|
||||
v.DefaultRuntime = daemon.configStore.GetDefaultRuntimeName()
|
||||
v.InitBinary = daemon.configStore.GetInitPath()
|
||||
|
|
Loading…
Reference in a new issue