mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
docker info: adjust warning strings for cgroup v2
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
This commit is contained in:
parent
8086443a44
commit
00225e220f
1 changed files with 22 additions and 6 deletions
|
@ -130,24 +130,40 @@ func (daemon *Daemon) fillPlatformInfo(v *types.Info, sysInfo *sysinfo.SysInfo)
|
||||||
// blkio weight is not available on cgroup v1 since kernel 5.0.
|
// 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.
|
// 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
|
// On cgroup v2, blkio weight is implemented using io.weight
|
||||||
v.Warnings = append(v.Warnings, "WARNING: No blkio weight support")
|
v.Warnings = append(v.Warnings, "WARNING: No io.weight support")
|
||||||
}
|
}
|
||||||
if !sysInfo.BlkioWeightDevice && v.CgroupVersion == "2" {
|
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 {
|
||||||
|
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")
|
v.Warnings = append(v.Warnings, "WARNING: No blkio throttle.read_bps_device support")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if !sysInfo.BlkioWriteBpsDevice {
|
if !sysInfo.BlkioWriteBpsDevice {
|
||||||
|
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")
|
v.Warnings = append(v.Warnings, "WARNING: No blkio throttle.write_bps_device support")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if !sysInfo.BlkioReadIOpsDevice {
|
if !sysInfo.BlkioReadIOpsDevice {
|
||||||
|
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")
|
v.Warnings = append(v.Warnings, "WARNING: No blkio throttle.read_iops_device support")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if !sysInfo.BlkioWriteIOpsDevice {
|
if !sysInfo.BlkioWriteIOpsDevice {
|
||||||
|
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")
|
v.Warnings = append(v.Warnings, "WARNING: No blkio throttle.write_iops_device support")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if !v.IPv4Forwarding {
|
if !v.IPv4Forwarding {
|
||||||
v.Warnings = append(v.Warnings, "WARNING: IPv4 forwarding is disabled")
|
v.Warnings = append(v.Warnings, "WARNING: IPv4 forwarding is disabled")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue