Merge pull request #41894 from AkihiroSuda/silence-dockerinfo
This commit is contained in:
commit
b865beba22
|
@ -100,10 +100,14 @@ func (daemon *Daemon) fillPlatformInfo(v *types.Info, sysInfo *sysinfo.SysInfo)
|
||||||
if !v.SwapLimit {
|
if !v.SwapLimit {
|
||||||
v.Warnings = append(v.Warnings, "WARNING: No swap limit support")
|
v.Warnings = append(v.Warnings, "WARNING: No swap limit support")
|
||||||
}
|
}
|
||||||
if !v.KernelMemoryTCP {
|
if !v.KernelMemoryTCP && v.CgroupVersion == "1" {
|
||||||
|
// kernel memory is not available for cgroup v2.
|
||||||
|
// Warning is not printed on cgroup v2, because there is no action user can take.
|
||||||
v.Warnings = append(v.Warnings, "WARNING: No kernel memory TCP limit support")
|
v.Warnings = append(v.Warnings, "WARNING: No kernel memory TCP limit support")
|
||||||
}
|
}
|
||||||
if !v.OomKillDisable {
|
if !v.OomKillDisable && v.CgroupVersion == "1" {
|
||||||
|
// oom kill disable is not available for cgroup v2.
|
||||||
|
// Warning is not printed on cgroup v2, because there is no action user can take.
|
||||||
v.Warnings = append(v.Warnings, "WARNING: No oom kill disable support")
|
v.Warnings = append(v.Warnings, "WARNING: No oom kill disable support")
|
||||||
}
|
}
|
||||||
if !v.CPUCfsQuota {
|
if !v.CPUCfsQuota {
|
||||||
|
@ -122,23 +126,42 @@ func (daemon *Daemon) fillPlatformInfo(v *types.Info, sysInfo *sysinfo.SysInfo)
|
||||||
v.Warnings = append(v.Warnings, "WARNING: Support for cgroup v2 is experimental")
|
v.Warnings = append(v.Warnings, "WARNING: Support for cgroup v2 is experimental")
|
||||||
}
|
}
|
||||||
// TODO add fields for these options in types.Info
|
// TODO add fields for these options in types.Info
|
||||||
if !sysInfo.BlkioWeight {
|
if !sysInfo.BlkioWeight && v.CgroupVersion == "2" {
|
||||||
v.Warnings = append(v.Warnings, "WARNING: No blkio weight support")
|
// blkio weight is not available on cgroup v1 since kernel 5.0.
|
||||||
|
// Warning is not printed on cgroup v1, because there is no action user can take.
|
||||||
|
// On cgroup v2, blkio weight is implemented using io.weight
|
||||||
|
v.Warnings = append(v.Warnings, "WARNING: No io.weight support")
|
||||||
}
|
}
|
||||||
if !sysInfo.BlkioWeightDevice {
|
if !sysInfo.BlkioWeightDevice && v.CgroupVersion == "2" {
|
||||||
v.Warnings = append(v.Warnings, "WARNING: No blkio weight_device support")
|
v.Warnings = append(v.Warnings, "WARNING: No io.weight (per device) support")
|
||||||
}
|
}
|
||||||
if !sysInfo.BlkioReadBpsDevice {
|
if !sysInfo.BlkioReadBpsDevice {
|
||||||
v.Warnings = append(v.Warnings, "WARNING: No blkio throttle.read_bps_device support")
|
if v.CgroupVersion == "2" {
|
||||||
|
v.Warnings = append(v.Warnings, "WARNING: No io.max (rbps) support")
|
||||||
|
} else {
|
||||||
|
v.Warnings = append(v.Warnings, "WARNING: No blkio throttle.read_bps_device support")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if !sysInfo.BlkioWriteBpsDevice {
|
if !sysInfo.BlkioWriteBpsDevice {
|
||||||
v.Warnings = append(v.Warnings, "WARNING: No blkio throttle.write_bps_device support")
|
if v.CgroupVersion == "2" {
|
||||||
|
v.Warnings = append(v.Warnings, "WARNING: No io.max (wbps) support")
|
||||||
|
} else {
|
||||||
|
v.Warnings = append(v.Warnings, "WARNING: No blkio throttle.write_bps_device support")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if !sysInfo.BlkioReadIOpsDevice {
|
if !sysInfo.BlkioReadIOpsDevice {
|
||||||
v.Warnings = append(v.Warnings, "WARNING: No blkio throttle.read_iops_device support")
|
if v.CgroupVersion == "2" {
|
||||||
|
v.Warnings = append(v.Warnings, "WARNING: No io.max (riops) support")
|
||||||
|
} else {
|
||||||
|
v.Warnings = append(v.Warnings, "WARNING: No blkio throttle.read_iops_device support")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if !sysInfo.BlkioWriteIOpsDevice {
|
if !sysInfo.BlkioWriteIOpsDevice {
|
||||||
v.Warnings = append(v.Warnings, "WARNING: No blkio throttle.write_iops_device support")
|
if v.CgroupVersion == "2" {
|
||||||
|
v.Warnings = append(v.Warnings, "WARNING: No io.max (wiops) support")
|
||||||
|
} else {
|
||||||
|
v.Warnings = append(v.Warnings, "WARNING: No blkio throttle.write_iops_device support")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if !v.IPv4Forwarding {
|
if !v.IPv4Forwarding {
|
||||||
|
|
Loading…
Reference in New Issue