Browse Source

[cgroups] Fix cpu controller name in runtime

Change-Id: Ibe2bd7cb6d63389cce6677a2c4552d06f3f02e9c
Related-Bug: #1669747
Michael Polenchuk 2 years ago
parent
commit
fad31f80a6
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      fuelweb_test/tests/test_cgroups.py

+ 4
- 1
fuelweb_test/tests/test_cgroups.py View File

@@ -79,7 +79,10 @@ class TestCgroupHa(TestBasic):
79 79
     def generate_lscgroups(cgroups):
80 80
         """Generate a list of lscgroups entities from cgroups dicts."""
81 81
 
82
-        return ["{}:/{}".format(cgroup["controller"], cgroup["process"])
82
+        cpu_controller = "cpu,cpuacct"
83
+        return ["{}:/{}".format(cpu_controller
84
+                if cgroup["controller"] in cpu_controller
85
+                else cgroup["controller"], cgroup["process"])
83 86
                 for cgroup in cgroups]
84 87
 
85 88
     def apply_cgroups(self, cgroups, node_ids):

Loading…
Cancel
Save