-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Make sure to show debian warning also for cgroup 2 #10468
Conversation
2690c0b
to
3992970
Compare
Move check to function, to cut down on complexity
3992970
to
2c87f6e
Compare
// requires CONFIG_MEMCG_SWAP_ENABLED or cgroup_enable=memory in grub | ||
klog.Warning("Your kernel does not support swap limit capabilities or the cgroup is not mounted.") | ||
memcgSwap = false | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one internal user told me they can not apply the memory limit either (I have logs in an issue)
I think we should skip the Memory limit too if this file doesnt exists
cat /sys/fs/cgroup/memory/memory.limit_in_bytes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added as PR #10507
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that one only checks for
if _, err := os.Stat("/sys/fs/cgroup/memory/memsw.limit_in_bytes");
we need to check for cat /sys/fs/cgroup/memory/memory.limit_in_bytes
to not add memory limits ( I will add a PR for that)
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: afbjorklund, medyagh The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
https://docs.docker.com/engine/install/linux-postinstall/#your-kernel-does-not-support-cgroup-swap-limit-capabilities
Closes #10371