Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve error message for cgroup limit #10519

Closed
medyagh opened this issue Feb 19, 2021 · 7 comments · Fixed by #10575
Closed

improve error message for cgroup limit #10519

medyagh opened this issue Feb 19, 2021 · 7 comments · Fixed by #10575
Assignees
Labels
co/docker-driver Issues related to kubernetes in container kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Milestone

Comments

@medyagh
Copy link
Member

medyagh commented Feb 19, 2021

❗ Cgroup v2 does not allow setting memory, if you want to set memory, please modify your Grub as instructed in https://docs.docker.com/engine/install/linux-postinstall/#your-k
ernel-does-not-support-cgroup-swap-limit-capabilities

@medyagh medyagh modified the milestones: v.1.19.0-candidate, v1.18.0 Feb 19, 2021
@tstromberg
Copy link
Contributor

I was just going to open an issue relating to this. This warning should probably only show up if someone is actually setting a memory restriction. 99% of folks won't care otherwise.

@afbjorklund
Copy link
Collaborator

afbjorklund commented Feb 20, 2021

Why does it say "Cgroup v2" ? And what was wrong with the original message, as issued by Docker ? (for v1)

WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted.

@afbjorklund
Copy link
Collaborator

afbjorklund commented Feb 20, 2021

Was added in #10512

But I think it should actually have been --memory-swap -1 to limit just the memory and not the swap.

From #10371 (comment)

Reopened that issue, it was closed by the bot by an earlier commit (when I thought it was just a warning)

@afbjorklund afbjorklund added co/docker-driver Issues related to kubernetes in container kind/bug Categorizes issue or PR as related to a bug. kind/ux and removed kind/ux labels Feb 20, 2021
@hetong07
Copy link
Contributor

hetong07 commented Feb 20, 2021

Sorry that I misunderstood this issue #10371 , so I added a wrong warning message. I saw different materials, and one said it is the cgroup v2 problem and the other said the error in #10371 is because it cannot set memory limit. So somehow I linked them together and wrote this inaccurate warning message.

@afbjorklund
Copy link
Collaborator

I think the confusing part is that Docker handles cgroup v1 and v2 very differently, with regards to the parameters.

Then again, WARNING: Support for cgroup v2 is experimental

@medyagh
Copy link
Member Author

medyagh commented Feb 21, 2021

@hetong07 I agree with @tstromberg if user did not Set --memory by flag ( we should NOT warn the user)
and also lets make the warnning something more elegant how about making it to Two lines

❗ Your cgroup does not allow setting memory.
📘  More information: https://docs.docker.com/engine/install/linux-postinstall/#your-kernel-does-not-support-cgroup-swap-limit-capabilities

@hetong07
Copy link
Contributor

hetong07 commented Feb 21, 2021

/assign

@priyawadhwa priyawadhwa added the priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. label Feb 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/docker-driver Issues related to kubernetes in container kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants