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

[Enancement] Support for CGroups v2 #3136

Open
ani-sinha opened this issue Jun 4, 2024 · 3 comments
Open

[Enancement] Support for CGroups v2 #3136

ani-sinha opened this issue Jun 4, 2024 · 3 comments
Assignees

Comments

@ani-sinha
Copy link

ani-sinha commented Jun 4, 2024

Looking at the code in CGroupConfigurator._Impl.initialize(), it seems WALinuxAgent does not quite support CGroups v2.
In __get_cgroup_controllers() we have :

            #                                                                                                                                                                                     
            # check v2 controllers                                                                                                                                                                
            #                                                                                                                                                                                     
            cgroup2_mount_point, cgroup2_controllers = self._cgroups_api.get_cgroup2_controllers()
            if cgroup2_mount_point is not None:
                _log_cgroup_info("cgroups v2 mounted at {0}.  Controllers: [{1}]", cgroup2_mount_point,
                                 cgroup2_controllers)


Then it does not do anything with cgroup2_mount_point etc. __get_cgroup_controllers() returns (None, None) so the following code
cpu_controller_root, memory_controller_root = self.__get_cgroup_controllers() makes cpu_controller_root and memory_controller_root both None. This when passed to __get_agent_cgroups() makes the later in turn return (None, None) . Therefore self._agent_cpu_cgroup_path and self._agent_memory_cgroup_path are both None which disabled CGroups support.

This ticket is raised to request support for it. CGroups v2 is default in Centos 9 and above.

@nagworld9 nagworld9 assigned nagworld9 and maddieford and unassigned nagworld9 Jun 7, 2024
@maddieford
Copy link
Contributor

Thanks for raising this @ani-sinha. Development is currently in progress to support v2

@sctweedie
Copy link

@maddieford Thanks --- do you have any idea when this might be released?

@maddieford
Copy link
Contributor

The target is to include the initial changes in the next +1 release, but there is no date decided for that release yet. I can post an update here when that release starts.

Please note that the initial changes only add v2 support for the log collector process (this will be opt-in by a flag in waagent.conf). Resource monitoring and enforcement using v2 for the agent and extension processes will come in later releases after the log collector scenario is validated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants