]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virt-host-validate: rewrite cgroup detection to use util/vircgroup
authorPavel Hrdina <phrdina@redhat.com>
Sat, 29 Sep 2018 19:37:22 +0000 (21:37 +0200)
committerPavel Hrdina <phrdina@redhat.com>
Fri, 5 Oct 2018 13:53:29 +0000 (15:53 +0200)
commit0f4d7daa8cd43b62911413c2cc1614f87380e459
tree888a455eef40463ad43db9f6f50ee785cf88c65f
parenta26de856f98119bf651ed9928c64b6f96f78f185
virt-host-validate: rewrite cgroup detection to use util/vircgroup

This removes code duplication and simplifies cgroup detection.
As a drawback we will not have separate messages to enable cgroup
controller in kernel or to mount it.  On the other side the rewrite
adds support for cgroup v2.

The kernel config support was wrong because it was parsing
'/proc/self/cgroup' instead of '/proc/cgroups/' file.

The mount suggestion is removed as well because it will not work
with cgroup v2.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
tools/virt-host-validate-common.c
tools/virt-host-validate-common.h
tools/virt-host-validate-lxc.c
tools/virt-host-validate-qemu.c