From nobody Sun Feb 8 19:59:30 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 154460985017649.47019687308625; Wed, 12 Dec 2018 02:17:30 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 271BC300287A; Wed, 12 Dec 2018 10:17:28 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E48045D756; Wed, 12 Dec 2018 10:17:27 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id CC0CE181B9E7; Wed, 12 Dec 2018 10:17:26 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id wBCAHOLO025934 for ; Wed, 12 Dec 2018 05:17:24 -0500 Received: by smtp.corp.redhat.com (Postfix) id D9BDE5D738; Wed, 12 Dec 2018 10:17:24 +0000 (UTC) Received: from antique-laptop.redhat.com (ovpn-12-137.pek2.redhat.com [10.72.12.137]) by smtp.corp.redhat.com (Postfix) with ESMTP id EA6AA5D70A for ; Wed, 12 Dec 2018 10:17:23 +0000 (UTC) From: Pavel Hrdina To: libvir-list@redhat.com Date: Wed, 12 Dec 2018 18:17:17 +0800 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/2] vircgroupv2: fix virCgroupV2ValidateMachineGroup X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Wed, 12 Dec 2018 10:17:28 +0000 (UTC) Content-Type: text/plain; charset="utf-8" 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 --- src/util/vircgroupv2.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/util/vircgroupv2.c b/src/util/vircgroupv2.c index dc2b2a65bc..b9925967d7 100644 --- a/src/util/vircgroupv2.c +++ b/src/util/vircgroupv2.c @@ -118,6 +118,12 @@ virCgroupV2ValidateMachineGroup(virCgroupPtr group, if (virCgroupPartitionEscape(&scopename) < 0) return false; =20 + if (!(tmp =3D strrchr(group->unified.placement, '/'))) + return false; + + if (STREQ(tmp, "/emulator")) + *tmp =3D '\0'; + if (!(tmp =3D strrchr(group->unified.placement, '/'))) return false; tmp++; --=20 2.19.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list