提交 634bd528 编写于 作者: P Pavel Hrdina

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: NPavel Hrdina <phrdina@redhat.com>
上级 b5325468
......@@ -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) &&
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册