]> xenbits.xensource.com Git - libvirt.git/commit
cgroup: Drop resource partition from virSystemdMakeScopeName
authorPeter Krempa <pkrempa@redhat.com>
Thu, 16 Jul 2015 13:35:05 +0000 (15:35 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 22 Jul 2015 05:12:56 +0000 (07:12 +0200)
commit88f6c007c3fb4324396ec397de57c8a80ba7b31d
tree6db748e4482791ada1458809485753a23f2e9aef
parent6600f4f3d84bc07ee344a56d193c0a45ad0b7f7b
cgroup: Drop resource partition from virSystemdMakeScopeName

The scope name, even according to our docs is
"machine-$DRIVER\x2d$VMNAME.scope" virSystemdMakeScopeName would use the
resource partition name instead of "machine-" if it was specified thus
creating invalid scope paths.

This makes libvirt drop cgroups for a VM that uses custom resource
partition upon reconnecting since the detected scope name would not
match the expected name generated by virSystemdMakeScopeName.

The error is exposed by the following log entry:

debug : virCgroupValidateMachineGroup:302 : Name 'machine-qemu\x2dtestvm.scope' for controller 'cpu' does not match 'testvm', 'testvm.libvirt-qemu' or 'machine-test-qemu\x2dtestvm.scope'

for a "/machine/test" resource and "testvm" vm.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1238570
src/lxc/lxc_process.c
src/qemu/qemu_cgroup.c
src/util/vircgroup.c
src/util/vircgroup.h
src/util/virsystemd.c
src/util/virsystemd.h
tests/virsystemdtest.c