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

Cgroups api refactor #6

Merged
merged 26 commits into from
Mar 15, 2024
Merged

Conversation

maddieford
Copy link
Owner

Description

Issue #


PR information

  • The title of the PR is clear and informative.
  • There are a small number of commits, each of which has an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
  • If applicable, the PR references the bug/issue that it fixes in the description.
  • New Unit tests were added for the changes made

Quality of Code and Contribution Guidelines

@maddieford maddieford merged commit 9501707 into cgroups_api_v2_refactor Mar 15, 2024
20 checks passed
@maddieford maddieford deleted the cgroups_api_refactor branch March 15, 2024 23:50
maddieford added a commit that referenced this pull request Apr 5, 2024
* Cgroups api refactor (#6)

* Initial changes for log collector cgroups v2 support

* Fix pylint issues

* Fix pylint issues

* Fix pylint issues

* Check that both controllers are mounted in the chosen cgroups version for log collector

* Fix regex

* Update test_agent unit tests

* Fix unit tests

* Update format strings

* Fix broken cgroupconfigurator unit tests

* pyling

* Fix cgroups api unit tests

* Ignore unused args

* Ignore unused args

* Add cgroup configurator tests

* v2 required check in parent cgroup

* unit tests is_controller_enabled

* Fix test failure and pylint:

* pylint

* Update agent checks

* Fix controller enable logic and unit tests

* Remove changes to collect logs

* Fix pylint

* Add e2e test for v2

* Fix log warnings

* Add cgroups v2 disabled scenario to daily runbook

* Address PR comments (#7)

* get_cgroup_api should raise exception when controllers not mounted

* Combine cgroups_supported() check

* Combine SystemdCgroupsApi and CGroupApi classes

* fix pylint and tests with sudo

* Rename SystemdCgroupsApi to SystemdCgroupApi

* Cgroup should be singular when referring to the APi

* Unimpleneted methods should raise NotImplementederror

* Check for cpu,cpuacct

* v2 start extension command should not be implemented

* log_cgorup_info and log_cgroup_warning should be in cgroupapi

* Systemd check should come before api

* Explicitly check for empty dict

* Only check if controllers are enabled at root for v2

* Remove unnecessary mocked paths in mock cgroup env

* V2 does not have concept of mounting controllers

* Fix super call for python 2

* get_cgroup_api should be function

* Move logging functions up

* Use stat -f to get cgroup mode

* Mock hybrid path

* Fix unit tests:

* Debug tests

* Debug tests

* Debug unit tests

* Fix unit tests

* Fix pylint

* Fix e2e test for v2

* Fix e2e test

* Fix e2e test

* Fix e2e test

* Combine common implementations

* Improve comments

* Pylint

* Address PR comments (#8)

* Run unit tests

* Clean up drop in files if cgroups are disabled

* Init values for cgroup apis

* Rever test change

* get_cgroup_api should check if mountpoints are correct (#9)

* Fix conflict after merge

* Merge issues (#10)

* Fix merge issues

* Fix unit tests

* get_cgroup_api raises InvalidCroupMountpointException (#11)

* get_cgroup_api can raise InvalidCgroupMountpointException

* Add unit test for agent

* Address PR comments (#12)
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

Successfully merging this pull request may close these issues.

1 participant