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

Make sure to show debian warning also for cgroup 2 #10468

Merged
merged 1 commit into from
Feb 18, 2021

Conversation

afbjorklund
Copy link
Collaborator

@afbjorklund afbjorklund commented Feb 13, 2021

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Feb 13, 2021
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 13, 2021
Move check to function, to cut down on complexity
// 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
}
Copy link
Member

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added as PR #10507

Copy link
Member

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)

@medyagh medyagh merged commit 369f93f into kubernetes:master Feb 18, 2021
@k8s-ci-robot
Copy link
Contributor

[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:
  • OWNERS [afbjorklund,medyagh]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Do not set memory limits for Cgroup v2 "memory.swap.max: permission denied"
3 participants