Skip to content

docker info: silence unhandleable warnings#41894

Merged
cpuguy83 merged 2 commits into
moby:masterfrom
AkihiroSuda:silence-dockerinfo
Jan 21, 2021
Merged

docker info: silence unhandleable warnings#41894
cpuguy83 merged 2 commits into
moby:masterfrom
AkihiroSuda:silence-dockerinfo

Conversation

@AkihiroSuda

@AkihiroSuda AkihiroSuda commented Jan 19, 2021

Copy link
Copy Markdown
Member

fixes #41790

- What I did

The following warnings in docker info are now discarded, because there is no action user can actually take.

On cgroup v1:

  • "WARNING: No blkio weight support"
  • "WARNING: No blkio weight_device support"

On cgroup v2:

  • "WARNING: No kernel memory TCP limit support"
  • "WARNING: No oom kill disable support"

docker run still prints warnings when the missing feature is being attempted to use.

- How I did it

See the code

- How to verify it
Run docker info

- Description for the changelog

docker info: silence unhandleable warnings

- A picture of a cute animal (not mandatory but encouraged)

🐧

The following warnings in `docker info` are now discarded,
because there is no action user can actually take.

On cgroup v1:
- "WARNING: No blkio weight support"
- "WARNING: No blkio weight_device support"

On cgroup v2:
- "WARNING: No kernel memory TCP limit support"
- "WARNING: No oom kill disable support"

`docker run` still prints warnings when the missing feature is being attempted to use.

Signed-off-by: Akihiro Suda <[email protected]>

@thaJeztah thaJeztah left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

Comment thread daemon/info_unix.go Outdated
// 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 blkio weight support")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we need to update the warnings to match the new cgroup? (ok for a follow-up)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

updated

@thaJeztah thaJeztah left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks!

@cpuguy83 cpuguy83 left a comment

Copy link
Copy Markdown
Member

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.

No kernel memory TCP limit & oom kill disable support

3 participants