diff options
author | Michal Privoznik <mprivozn@redhat.com> | 2021-12-10 13:46:54 +0100 |
---|---|---|
committer | Michal Privoznik <mprivozn@redhat.com> | 2021-12-10 16:22:49 +0100 |
commit | 9ca80bfa1180a0bd83b4bb2d324bce60fb82dbdb (patch) | |
tree | 9d0a605eda68fbeb95d45e3876e796d17a99e323 /src/lxc/lxc_controller.c | |
parent | 2bdd654269a2febf306ec840b72daf46336c9421 (diff) | |
download | libvirt-9ca80bfa1180a0bd83b4bb2d324bce60fb82dbdb.tar.gz |
Revert "lxc: controller: Fix container launch on cgroup v1"
Unfortunately, this fix breakes machinectl in a very nasty way,
for instance 'machinectl shell' drops into the host shell. It's
worse than being unable to start a container with CGroupsV1.
Revert until a proper fix is figured out.
This reverts commit 1b9ce05ce241a581d4e80228c92ceb0266f21f94.
References: https://gitlab.com/libvirt/libvirt/-/issues/182
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Diffstat (limited to 'src/lxc/lxc_controller.c')
-rw-r--r-- | src/lxc/lxc_controller.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c index 039efcd7c7..7c593ee3a9 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 */ |