app-emulation/libvirt: v7.(9|10).0: (temporary) fix cgroup v2 support

Revert an upstream commit that fixed an libvirt_lxc container startup
issue with cgroup v1 layout. The patch in question breaks
systemd-machined integration (at least under cgroup v2 layout).

Le't temporarily revert the commit in question until upstream has found
a proper fix.

Bug: https://bugs.gentoo.org/828542
Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Matthias Maier <tamiko@gentoo.org>
This commit is contained in:
Matthias Maier
2021-12-08 15:14:21 -06:00
parent 0d14e0f00d
commit 46d2a0c12d
3 changed files with 34 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
From c80a05cd7d5f17ee16a2bc2546981863451fcab7 Mon Sep 17 00:00:00 2001
From: "System user; portage" <portage@kestrel.43-1.org>
Date: Wed, 8 Dec 2021 15:07:06 -0600
Subject: [PATCH] Revert "lxc: controller: Fix container launch on cgroup v1"
This reverts commit 1b9ce05ce241a581d4e80228c92ceb0266f21f94.
---
src/lxc/lxc_controller.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c
index 444f728af4..8953e0c904 100644
--- a/src/lxc/lxc_controller.c
+++ b/src/lxc/lxc_controller.c
@@ -865,12 +865,12 @@ static int virLXCControllerSetupCgroupLimits(virLXCController *ctrl)
nodeset = virDomainNumatuneGetNodeset(ctrl->def->numa, auto_nodeset, -1);
if (!(ctrl->cgroup = virLXCCgroupCreate(ctrl->def,
- getpid(),
+ ctrl->initpid,
ctrl->nnicindexes,
ctrl->nicindexes)))
goto cleanup;
- if (virCgroupAddMachineProcess(ctrl->cgroup, ctrl->initpid) < 0)
+ if (virCgroupAddMachineProcess(ctrl->cgroup, getpid()) < 0)
goto cleanup;
/* Add all qemu-nbd tasks to the cgroup */
--
2.32.0

View File

@@ -134,6 +134,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-6.0.0-fix_paths_in_libvirt-guests_sh.patch
"${FILESDIR}"/${PN}-6.7.0-do-not-use-sysconfig.patch
"${FILESDIR}"/${PN}-6.7.0-fix-paths-for-apparmor.patch
"${FILESDIR}"/${PN}-7.9.0-fix_cgroupv2.patch
)
pkg_setup() {

View File

@@ -134,6 +134,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-6.0.0-fix_paths_in_libvirt-guests_sh.patch
"${FILESDIR}"/${PN}-6.7.0-do-not-use-sysconfig.patch
"${FILESDIR}"/${PN}-6.7.0-fix-paths-for-apparmor.patch
"${FILESDIR}"/${PN}-7.9.0-fix_cgroupv2.patch
)
pkg_setup() {