-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
helpers: fix reading cpu stats on cgroup v2 #2839
Conversation
Hi @giuseppe. Thanks for your PR. I'm waiting for a google 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. |
/cc @odinuge |
0ab053a
to
d26ea04
Compare
d26ea04
to
32ecf85
Compare
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.
Awesome! Was going to fix this, but didn't have time... 😅 This fixes quota related metrics for cadvisor and k8s. 😄
32ecf85
to
dc6738b
Compare
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.
My 3 cents. Do you think it would be possible to mock both version of cgroupfs and run create a test that would read from such a file system?
/ok-to-test |
dc6738b
to
59d89eb
Compare
I guess it should be doable, I'll take a look |
is it a blocker for this PR? |
It would be appreciated. If you think it's undoable or difficult to do (e.g. because of cAdvisor architecture then let me know, please). |
read quota and limit from cpu.max, and convert cpu.weight to the range expected with cgroup v1. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
59d89eb
to
70b339d
Compare
thanks. Tests added as you've suggested |
移植upstream对kubelet及cadvisor的修改,修复使用cgroupv2时指标收集统计的问题 1. port cadvisor pr google/cadvisor#2839 reading cpu stats on cgroup v2 2. port cadvisor pr google/cadvisor#2837 read "max" value for cgroup v2 3. port cadvisor pr google/cadvisor#2801 gathering of stats for root cgroup on v2 4. port cadvisor pr google/cadvisor#2800: Update heuristic for container creation time 5. Fix cgroup handling for systemd with cgroup v2 6. test: adjust summary test for cgroup v2
read quota and limit from cpu.max, and convert cpu.weight to the range
expected with cgroup v1.
Signed-off-by: Giuseppe Scrivano gscrivan@redhat.com