Skip to content

printServerWarningsLegacy: silence "No kernel memory limit support"; silence "No oom kill disable support" on cgroup v2#3077

Merged
silvin-lubecki merged 2 commits intodocker:masterfrom
AkihiroSuda:silence-unhandleable-deprecated-warnings
May 18, 2021
Merged

printServerWarningsLegacy: silence "No kernel memory limit support"; silence "No oom kill disable support" on cgroup v2#3077
silvin-lubecki merged 2 commits intodocker:masterfrom
AkihiroSuda:silence-unhandleable-deprecated-warnings

Conversation

@AkihiroSuda
Copy link
Collaborator

- What I did
Removed unhandleable warnings from printServerWarningsLegacy().

- How I did it

These warnings have been already silenced on the daemon side.

- How to verify it
Before:

$ docker info
...
Cgroup Version: 2
...

WARNING: No kernel memory limit support
WARNING: No oom kill disable support

After: (no warning)

@AkihiroSuda AkihiroSuda requested a review from thaJeztah May 4, 2021 09:48
@AkihiroSuda AkihiroSuda force-pushed the silence-unhandleable-deprecated-warnings branch 3 times, most recently from c43b745 to 58c85d3 Compare May 4, 2021 10:10
The kernel memory limit is deprecated in Docker 20.10.0,
and its support was removed in runc v1.0.0-rc94.
So, this warning can be safely removed.

Relevant: moby/moby@b8ca7de

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
…group v2

The warning should be ignored on cgroup v2 hosts.

Relevant: moby/moby@8086443

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
@AkihiroSuda AkihiroSuda force-pushed the silence-unhandleable-deprecated-warnings branch from 58c85d3 to 204fad1 Compare May 4, 2021 10:50
@AkihiroSuda AkihiroSuda closed this May 4, 2021
@AkihiroSuda AkihiroSuda reopened this May 4, 2021
@AkihiroSuda AkihiroSuda force-pushed the silence-unhandleable-deprecated-warnings branch from 204fad1 to 05ec018 Compare May 4, 2021 11:08
@thaJeztah
Copy link
Member

I actually think it's a bug that we hit this code; instead of checking if the Warnings slice is empty, we should also skip this function based on API version used;

if len(info.Warnings) > 0 {

@AkihiroSuda
Copy link
Collaborator Author

I actually think it's a bug that we hit this code; instead of checking if the Warnings slice is empty, we should also skip this function based on API version used;

Yes, but even when DOCKER_API_VERSION is set to an old version, I think we should silence the unhandleable warnings.

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thaJeztah thaJeztah added this to the 21.xx milestone May 4, 2021
@thaJeztah
Copy link
Member

@silvin-lubecki ptal

Copy link
Contributor

@silvin-lubecki silvin-lubecki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants