From nobody Mon Apr 29 15:00:13 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1639140710; cv=none; d=zohomail.com; s=zohoarc; b=Ab8RvH9Ccd8+guRB0dLZaIBNVcNYqdZcjfetiY3qTJzQGmiYSlnRYw1G2Th8z2a348fLczSE5ZE8616xrNbAgCpjhXGkP9AfFfHl7StmZtrqGHXepxeY99RnjomaiSUtdcOgp58B90O1+SKxuRxFAvGOrAz834AZc9Rzu6BCaDA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1639140710; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=VJzIYlVT0d34UVtln8KAJIx+mnfheFrk+7AR+EPxOWU=; b=esIqF2aBMMn+PDBCse5SYbHnapdef/FnGhdiCxNrf5hJYv/9efiLkjOr4Ct011bQpxCl8nnCbMhBNO+j/Mmnt+4KkzMLi2+NsD8actVi9MsLeRmFSVCmjFdGTXGYhuTOIB0auMXXG4cb87OksZkxIhxhGglt0SfHJrXbKc7eB4E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1639140710553989.0315600030916; Fri, 10 Dec 2021 04:51:50 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-147-1qpfvbBKP_KPHXNpbBOXCg-1; Fri, 10 Dec 2021 07:51:46 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 972DA363A7; Fri, 10 Dec 2021 12:51:40 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 261C910013D0; Fri, 10 Dec 2021 12:51:40 +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 1BB294BB7C; Fri, 10 Dec 2021 12:51:39 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1BACmpwT028371 for ; Fri, 10 Dec 2021 07:48:51 -0500 Received: by smtp.corp.redhat.com (Postfix) id 476A960C04; Fri, 10 Dec 2021 12:48:51 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id C3E1360BE5 for ; Fri, 10 Dec 2021 12:48:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1639140709; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=VJzIYlVT0d34UVtln8KAJIx+mnfheFrk+7AR+EPxOWU=; b=VzRZ7BEp5IsakxkF1WmHyG93mnaMg5wW9IfhwgKQlv/6CpYvSXAy4azDUSYQz9Llxm1yM9 L60CF0opR4eF08LyYexCbYxi3JRY3rzelXeAFUYvJN6u1+Jl2fSdj86/i/2KRcuuN5f/51 nZyo7NvzIlrX2vrK/PDTYdMh7zdEtV8= X-MC-Unique: 1qpfvbBKP_KPHXNpbBOXCg-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH] Revert "lxc: controller: Fix container launch on cgroup v1" Date: Fri, 10 Dec 2021 13:48:43 +0100 Message-Id: <06d6a324c4620c19cacfaeef52c0b6dff84b74a2.1639140523.git.mprivozn@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1639140712778100001 Content-Type: text/plain; charset="utf-8" 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. Signed-off-by: Michal Privoznik Reviewed-by: Pavel Hrdina --- 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 039efcd7c7..7c593ee3a9 100644 --- a/src/lxc/lxc_controller.c +++ b/src/lxc/lxc_controller.c @@ -865,12 +865,12 @@ static int virLXCControllerSetupCgroupLimits(virLXCCo= ntroller *ctrl) nodeset =3D virDomainNumatuneGetNodeset(ctrl->def->numa, auto_nodeset,= -1); =20 if (!(ctrl->cgroup =3D virLXCCgroupCreate(ctrl->def, - getpid(), + ctrl->initpid, ctrl->nnicindexes, ctrl->nicindexes))) goto cleanup; =20 - if (virCgroupAddMachineProcess(ctrl->cgroup, ctrl->initpid) < 0) + if (virCgroupAddMachineProcess(ctrl->cgroup, getpid()) < 0) goto cleanup; =20 /* Add all qemu-nbd tasks to the cgroup */ --=20 2.32.0