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
koordlet: fix can not collect psi metrics #1402
koordlet: fix can not collect psi metrics #1402
Conversation
6ed709b
to
5ff5f04
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #1402 +/- ##
==========================================
+ Coverage 64.74% 64.76% +0.02%
==========================================
Files 333 333
Lines 34296 34345 +49
==========================================
+ Hits 22204 22243 +39
- Misses 10458 10468 +10
Partials 1634 1634
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
5ff5f04
to
14a260f
Compare
58d7527
to
386df6d
Compare
Signed-off-by: lucming <2876757716@qq.com>
386df6d
to
6c5ebad
Compare
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hormes 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 |
Ⅰ. Describe what this PR does
koordlet can not collect psi metrics.
Ⅱ. Does this pull request fix one issue?
Ⅲ. Describe how to verify it
update-kernel
need to be replaced with the actual kernel version3.1. Access to koordlet's metrics api, but didn't get any info about psi
3.2. check koordlet's log:
It seems to be saying that there are no pressure related files under cpuacct cgroup
3.3. looking at the cgroup, we can see that psi-related files exist
then there may be a problem with koordlet handling
The essential cause of the problem:
In golang, global variables are initialized before normal functions, so even though there is logic in the koordlet that modifies
CgroupPathFormatter
, the initialization of global variables only happens once and before the modification, so the logic inSupportedIfFileExistsInKubepods
will usecgroupPathFormatterInSystemd
, then the file related to psi can not be find, then making koordlet decide not support psi.Ⅳ. Special notes for reviews
V. Checklist
make test