-
Notifications
You must be signed in to change notification settings - Fork 523
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 memory limit check bytes to GB conversion #13838
Conversation
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.
LGTM! Thanks for the fix! 🙇
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.
Thanks for the fix and tidying the code!
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.
nice catch!
non-blocker: is this something that can be covered by tests? Otherwise, the PR test instructions are clear enough should be fine.
b9b884f
to
d7b2f12
Compare
d7b2f12
to
d05e2de
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.
changes lgtm. Thanks for the tests.
Could you remove the changelog? It will be added back later in the release process. Sorry if I didn't express that clearly in the earlier comment.
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.
I'll approve it first so you can merge it right away after removing the changelog (if github allows you to do that)
Fixes the memory limit auto check conversion in beater runner, when cgroups memory limit was scaled to gigabytes while the total memory limit stayed in bytes. Additional tests coverage is added to better validate memory conversion logic. (cherry picked from commit 6ad5821)
…13876) Fixes the memory limit auto check conversion in beater runner, when cgroups memory limit was scaled to gigabytes while the total memory limit stayed in bytes. Additional tests coverage is added to better validate memory conversion logic. (cherry picked from commit 6ad5821) Co-authored-by: Kostiantyn Masliuk <[email protected]>
Tested with
|
Motivation/summary
This PR closed the issue #13837, by fixing the bytes to GB conversion in the fallback memory check.
Checklist
Update CHANGELOG.asciidocFor functional changes, consider:
How to test these changes
The easiest way to test this change is to create a custom cgroup with a memory limit that is larger than the total system memory, then start apm-server binary with the created cgroup. Observer APM Server logs for "cgroup memory limit exceed available memory, falling back to the total system memory".
Related issues
Changelog
==== Bug fixes