From 12e2f94eba9c562c7a697aa85bc7d7f32e43eb9c Mon Sep 17 00:00:00 2001 From: Akihiro Suda Date: Tue, 4 May 2021 18:43:18 +0900 Subject: [PATCH] printServerWarningsLegacy: silence "No oom kill disable support" on cgroup v2 The warning should be ignored on cgroup v2 hosts. Relevant: https://github.com/moby/moby/pull/41894/commits/8086443a449af8ef5c5b0574de8957df7e52f296 Signed-off-by: Akihiro Suda (cherry picked from commit 05ec0188fa0a9d722949304c60a264c065f3d326) Signed-off-by: Sebastiaan van Stijn --- cli/command/system/info.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/command/system/info.go b/cli/command/system/info.go index 80616de3b1..c19946d09e 100644 --- a/cli/command/system/info.go +++ b/cli/command/system/info.go @@ -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 {