commit 973ff4fc1a0586937d13f2b39e517422713b1003
Author: Jorge San Emeterio <email address hidden>
Date: Wed Feb 8 15:33:54 2023 +0100
Have host look for CPU controller of cgroupsv2 location.
Make the host class look under '/sys/fs/cgroup/cgroup.controllers' for support of the cpu controller. The host will try searching through cgroupsv1 first, just like up until now, and in the case that fails, it will try cgroupsv2 then. The host will not support the feature if both checks fail.
This new check needs to be mocked by all tests that focus on this piece of code, as it touches a system file that requires privileges. For such thing, the CGroupsFixture is defined to easily add suck mocking to all test cases that require so.
I also removed old mocking at test_driver.py in favor of the fixture from above.
Reviewed: https:/ /review. opendev. org/c/openstack /nova/+ /873127 /opendev. org/openstack/ nova/commit/ 973ff4fc1a05869 37d13f2b39e5174 22713b1003
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 973ff4fc1a05869 37d13f2b39e5174 22713b1003
Author: Jorge San Emeterio <email address hidden>
Date: Wed Feb 8 15:33:54 2023 +0100
Have host look for CPU controller of cgroupsv2 location.
Make the host class look under '/sys/fs/ cgroup/ cgroup. controllers' for support of the cpu controller. The host will try searching through cgroupsv1 first, just like up until now, and in the case that fails, it will try cgroupsv2 then. The host will not support the feature if both checks fail.
This new check needs to be mocked by all tests that focus on this piece of code, as it touches a system file that requires privileges. For such thing, the CGroupsFixture is defined to easily add suck mocking to all test cases that require so.
I also removed old mocking at test_driver.py in favor of the fixture from above.
Partial-Bug: #2008102 5389bec2b7f05af 660bab85610
Change-Id: I99b57c27c8a442