-
Notifications
You must be signed in to change notification settings - Fork 372
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(cgroup): Properly handle cgroup v2 systems #2989
Conversation
@CalvoM Thank you. @maddieford is currently working on adding support for cgroups v2 to the Agent. She can provide context about the approach we are taking and ensure this PR matches that. |
080c46a
to
81f57b4
Compare
Thanks for the PR @CalvoM, I'm currently working on adding support for v2. I need some time to look into this and I'll get back |
Hello @maddieford, any progress on the review of this PR? |
WALA was just handling cgroup v1 systems and failing on cgroup v2 systems We are adding proper handling of cgroup v2 files
81f57b4
to
3a650d6
Compare
Hey @CalvoM, we had an urgent issue we needed to attend to since early December and just now are resuming work on cgroups v2. We decided to refactor our CGroups API to support v2, work for this is in progress |
Hello @maddieford , I'm working now in the WALinuxAgent package in Ubuntu. I'm wondering if the refactor you were referring is #3096 ... could you confirm it? Or need more work to be done, e.g.: I'm asking because, in Ubuntu, this PR is handled like a patch over WALinuxAgent, and when upgrading the Ubuntu package to the latest WALinuxAgent release this doesn't apply anymore... I'm looking trough the possible changes to refresh the patch, but I see #3096 is still on develop branch... Guessing if this "skip cgroup monitoring if log collector doesn't start by the agent. #2939 [Added in 2.10.0.8]" could impact too ... Anyway, If you can give me a clue about the possible (or not) compatibility of this (or if this has been fixed with another approach through other refactors/additions) I'll appreciate so much. |
Hi @mirespace, the support is being merged in incrementally. Even with these changes, cgroup v2 is not yet supported by the agent. Any cgroup usage by the agent is gated behind a flag. In the latest version of the agent, the agent looks for the v1 mountpoints at initialization, and if it doesn't find them then it disables any usage of cgroups (the agent handles this case gracefully so this shouldn't break the agent or require a patch).
The changes in #3096 update the agent to identify whether v1 or v2 is being used. If v2, then the agent also disables any cgroup usage, but now with a more helpful log. This change has not been released yet. If the changes in this PR (#2989) were included in the agent, then the agent would start identifying v2 mountpoints without updating other areas of the code (including monitoring) which hasn't been tested and will likely cause unexpected/unwanted behaviors. What behavior are you seeing from the guest agent that would require a patch? |
Hi @maddieford, I was checking the general status of the Ubuntu deb package and proceeding to update it to version v2.11.1.4, when I discovered that we have a patch (a deb patch) that doesn't apply to that version. Following the patch information, I saw that it had been forwarded here (this PR is the submitted code). I assumed that the patch fixed #2815, as I read in the description of this PR. Since #2815 is open, I assumed it is not fixed in another way, so that would be the incorrect behaviour that should still be occurring. |
Hey @mirespace, sorry I missed that the original issue was in regards to Log Collector (#2815) Right now, it is intentional that the agent does not enable cgroup usage when v2 is detected. The agent requires that cgroup usage is enabled for the log collector to run periodically. As a result, the log collector is not running periodically on v2 machines. We're working on those changes now to support v2. In 2.9.0.4 there was a bug which prevented users from using the command line option to run log collector due to v2 not yet being supported, as pointed out in #2815. We released a fix for that issue (as you pointed out #2939) in v2.10.0.8 to allow users to run the log collector by command line without cgroup monitoring. |
Hi @maddieford! There's nothing to be sorry about... That's a lot of questions/numbers. Thanks to you for your answer! |
WALA was just handling cgroup v1 systems and failing on cgroup v2 systems
We are adding proper handling of cgroup v2 files
Description
Issue #2815
PR information
Quality of Code and Contribution Guidelines