-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Fix kubelet_kubelet_cgroups_cgroupfs #8500
Fix kubelet_kubelet_cgroups_cgroupfs #8500
Conversation
If kubelet is run with systemd (as it always is when using kubespray), it starts in systemd's /system.slice/kubelet.service cgroup. This commit prevents a creation and usage of a second unrelated cgroup.
Hi @fungusakafungus. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
test failure for packet_debian10-calico looks like a flake:
|
be patient 😛 jobs are auto retried at least once |
/ok-to-test |
@pasqualet Thank you for reviewing this pull request. /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: floryut, fungusakafungus, pasqualet 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 |
If kubelet is run with systemd (as it always is when using kubespray), it starts in systemd's /system.slice/kubelet.service cgroup. This commit prevents a creation and usage of a second unrelated cgroup.
If kubelet is run with systemd (as it always is when using kubespray), it starts in systemd's /system.slice/kubelet.service cgroup. This commit prevents a creation and usage of a second unrelated cgroup.
If kubelet is run with systemd (as it always is when using kubespray), it starts in systemd's /system.slice/kubelet.service cgroup. This commit prevents a creation and usage of a second unrelated cgroup.
If kubelet is run with systemd (as it always is when using kubespray),
it starts in systemd's /system.slice/kubelet.service cgroup.
This commit prevents a creation and usage of a second unrelated cgroup.
What type of PR is this?
/kind bug
What this PR does / why we need it:
This fixes a slight error introduced in #8123
As I have observed, kubelet starts in
/system.slice/kubelet.service
and then moves itself tokubeletCgroups
value:This results in cAdvisor kubelet metrics showing both of these cgroups.
Alternatively, we could let kubelet figure out the right cgroup for itself(by setting
kubeletCgroups
to "" or leaving it out of config), it seems to do that by looking atname=systemd:
entry in/proc/<own pid>/cgroups
(code for v1.21), which would produce the same result for me at least.The defaulting doesn't work for
kubelet_runtime_cgroups_cgroupfs
on the previous line, as kubernetes currently only has special handling for docker runtime: https://github.com/kubernetes/kubernetes/blob/v1.23.0/pkg/kubelet/cm/helpers_linux.go#L343Which issue(s) this PR fixes:
#8123
Special notes for your reviewer:
Does this PR introduce a user-facing change?: