Comment 3 for bug 2008102

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.opendev.org/c/openstack/nova/+/873127
Committed: https://opendev.org/openstack/nova/commit/973ff4fc1a0586937d13f2b39e517422713b1003
Submitter: "Zuul (22348)"
Branch: master

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.

    Partial-Bug: #2008102
    Change-Id: I99b57c27c8a4425389bec2b7f05af660bab85610