mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 03:12:22 +00:00
vircgroupv2: fix virCgroupV2ValidateMachineGroup
When libvirt is reconnecting to running domain that uses cgroup v2 the QEMU process reports cgroup for the emulator directory because the main thread is in that cgroup. We need to remove the "/emulator" part in order to match with the root cgroup directory name for that domain. Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
b532546823
commit
634bd528cb
@ -120,6 +120,13 @@ virCgroupV2ValidateMachineGroup(virCgroupPtr group,
|
||||
|
||||
if (!(tmp = strrchr(group->unified.placement, '/')))
|
||||
return false;
|
||||
|
||||
if (STREQ(tmp, "/emulator")) {
|
||||
*tmp = '\0';
|
||||
|
||||
if (!(tmp = strrchr(group->unified.placement, '/')))
|
||||
return false;
|
||||
}
|
||||
tmp++;
|
||||
|
||||
if (STRNEQ(tmp, partmachinename) &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user