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

Adjust osprobe assertion for burst cpu #86990

Merged
merged 2 commits into from
May 20, 2022

Conversation

rjernst
Copy link
Member

@rjernst rjernst commented May 20, 2022

When gathering v1 cgroup cpu stats, the file is expected to have 3
lines. However, if the burst feature of cpu accounting is enabled, it
will actually have 5 lines. This commit adjusts the assertion to allow
for the extra lines. We ignore these lines already in the parsing of the
calling method. Unfortunately this is not currently easy to test, and no
tests exist. Give it is just an assertion that is relaxing, I think it's
ok to fix this issue, and separately work on revamping the OsProbe
tests.

When gathering v1 cgroup cpu stats, the file is expected to have 3
lines. However, if the burst feature of cpu accounting is enabled, it
will actually have 5 lines. This commit adjusts the assertion to allow
for the extra lines. We ignore these lines already in the parsing of the
calling method. Unfortunately this is not currently easy to test, and no
tests exist. Give it is just an assertion that is relaxing, I think it's
ok to fix this issue, and separately work on revamping the OsProbe
tests.
@elasticmachine elasticmachine added the Team:Core/Infra Meta label for core/infra team label May 20, 2022
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

@rjernst rjernst requested a review from grcevski May 20, 2022 17:12
@elasticsearchmachine
Copy link
Collaborator

Hi @rjernst, I've created a changelog YAML for you.

Copy link
Contributor

@grcevski grcevski left a comment

Choose a reason for hiding this comment

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

LGTM!

@javanna
Copy link
Member

javanna commented May 20, 2022

thanks a lot for addressing this, it will definitely make my life easier :)

@rjernst rjernst merged commit 1fb6f43 into elastic:master May 20, 2022
@rjernst rjernst deleted the os_probe_cpu_burst_stat branch May 20, 2022 18:09
rjernst added a commit to rjernst/elasticsearch that referenced this pull request May 20, 2022
When gathering v1 cgroup cpu stats, the file is expected to have 3
lines. However, if the burst feature of cpu accounting is enabled, it
will actually have 5 lines. This commit adjusts the assertion to allow
for the extra lines. We ignore these lines already in the parsing of the
calling method. Unfortunately this is not currently easy to test, and no
tests exist. Give it is just an assertion that is relaxing, I think it's
ok to fix this issue, and separately work on revamping the OsProbe
tests.
rjernst added a commit to rjernst/elasticsearch that referenced this pull request May 20, 2022
When gathering v1 cgroup cpu stats, the file is expected to have 3
lines. However, if the burst feature of cpu accounting is enabled, it
will actually have 5 lines. This commit adjusts the assertion to allow
for the extra lines. We ignore these lines already in the parsing of the
calling method. Unfortunately this is not currently easy to test, and no
tests exist. Give it is just an assertion that is relaxing, I think it's
ok to fix this issue, and separately work on revamping the OsProbe
tests.
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.2
7.17

elasticsearchmachine pushed a commit that referenced this pull request May 20, 2022
When gathering v1 cgroup cpu stats, the file is expected to have 3
lines. However, if the burst feature of cpu accounting is enabled, it
will actually have 5 lines. This commit adjusts the assertion to allow
for the extra lines. We ignore these lines already in the parsing of the
calling method. Unfortunately this is not currently easy to test, and no
tests exist. Give it is just an assertion that is relaxing, I think it's
ok to fix this issue, and separately work on revamping the OsProbe
tests.
elasticsearchmachine pushed a commit that referenced this pull request May 23, 2022
When gathering v1 cgroup cpu stats, the file is expected to have 3
lines. However, if the burst feature of cpu accounting is enabled, it
will actually have 5 lines. This commit adjusts the assertion to allow
for the extra lines. We ignore these lines already in the parsing of the
calling method. Unfortunately this is not currently easy to test, and no
tests exist. Give it is just an assertion that is relaxing, I think it's
ok to fix this issue, and separately work on revamping the OsProbe
tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Core/Infra/Core Core issues without another label Team:Core/Infra Meta label for core/infra team v7.17.5 v8.2.1 v8.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants