printServerWarningsLegacy: silence "No oom kill disable support" on cgroup v2

The warning should be ignored on cgroup v2 hosts.

Relevant: 8086443a44

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
This commit is contained in:
Akihiro Suda 2021-05-04 18:43:18 +09:00
parent 731f52cfe8
commit 05ec0188fa
No known key found for this signature in database
GPG Key ID: 49524C6F9F638F1A
1 changed files with 1 additions and 1 deletions

View File

@ -402,7 +402,7 @@ func printServerWarningsLegacy(dockerCli command.Cli, info types.Info) {
if !info.SwapLimit {
fmt.Fprintln(dockerCli.Err(), "WARNING: No swap limit support")
}
if !info.OomKillDisable {
if !info.OomKillDisable && info.CgroupVersion != "2" {
fmt.Fprintln(dockerCli.Err(), "WARNING: No oom kill disable support")
}
if !info.CPUCfsQuota {