From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:c151::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id AEqMMzGcGGRpawAASxT56A (envelope-from ) for ; Mon, 20 Mar 2023 18:47:29 +0100 Received: from aspmx2.migadu.com ([2001:41d0:2:c151::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id mKiGMzGcGGSgGAEAauVa8A (envelope-from ) for ; Mon, 20 Mar 2023 18:47:29 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx2.migadu.com (Postfix) with ESMTPS id A651836B24 for ; Mon, 20 Mar 2023 18:47:29 +0100 (CET) Authentication-Results: aspmx2.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx2.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1679334449; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=bcZ+lTbTRMHWnn8w7eMhELiZqV4D0LIZTGz3ww0ZENw=; b=hLsFYy3Aa6gGeXqe/3dc45NqqrrBB9ungYIixbwehYBBjznNwHwt/8RAIZXgSe1kHz7nbR E2z10natQGZbHNYXtf/pr7nulfsmDbovrKKy+lWrWkTW3kQtuTq3KczMxpReFFfAKTPKO5 fX43tNIydsDefraTg9gQdcoOlvxHESCu1rhR2jvc/k+7An3UoEy2O5rBsTlVr/75aoY1PF YlYpkOuR46pHeotfYNR/+e0b+FGE++Z3jmF3itffQ7IP+OT649nk0DWP/EHx8MB6hJBL3w m+YcKaB8XY0T4YIOdga0ZTxtrWup0Nd6Atx0k3vZ0iMz5q7W9GgEK9j5auyJjA== ARC-Authentication-Results: i=1; aspmx2.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx2.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1679334449; a=rsa-sha256; cv=none; b=oMDBMlFc/yHgw9wshrjz4CU2bd4ugG9Y9hH1tTteSiWgccbWwl72vtpwvlwvFvY2mvpLC4 f+r59GTM/FqAu5PRYdAY4y8V+HM5gOEHGF3M6OoNsfrXiJCmdK1WU+fvMQckkKOk+Jg3W9 7sO1BnJM05lGdmolFo6uTPFElxCvWxsCqgiELk9+qCc8Tl7+Zs99vhsJ4l0rLz88WFKfMq ZPMcLBXNVb4oh9ZYieuHeDFFPpK7dV3PoE33lKZkuOLkEVxXUpdm/9Kb3R/yuEK9z/ytCO IWxF6J2cRtbJnBEcwQLz6NY20aEr8vZzUTLpjxbLRimosy355uE2xffKrDKhIw== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1peJbH-0003fC-1v; Mon, 20 Mar 2023 13:47:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1peJb5-0003cu-DH for bug-guix@gnu.org; Mon, 20 Mar 2023 13:47:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1peJb4-00087I-7B for bug-guix@gnu.org; Mon, 20 Mar 2023 13:47:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1peJb4-00061C-33 for bug-guix@gnu.org; Mon, 20 Mar 2023 13:47:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#61627: Cannot start a container built with `guix system container --network'. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 20 Mar 2023 17:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61627 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Pierre Langlois Cc: arunisaac@systemreboot.net, Ludovic =?UTF-8?Q?Court=C3=A8s?= , 61627@debbugs.gnu.org Received: via spool by 61627-submit@debbugs.gnu.org id=B61627.167933440323100 (code B ref 61627); Mon, 20 Mar 2023 17:47:02 +0000 Received: (at 61627) by debbugs.gnu.org; 20 Mar 2023 17:46:43 +0000 Received: from localhost ([127.0.0.1]:56713 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peJak-00060V-Mu for submit@debbugs.gnu.org; Mon, 20 Mar 2023 13:46:42 -0400 Received: from smtpm1.myservices.hosting ([185.26.105.232]:34720) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peJai-0005zi-Tf for 61627@debbugs.gnu.org; Mon, 20 Mar 2023 13:46:41 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm1.myservices.hosting (Postfix) with ESMTP id 1B1D72053D; Mon, 20 Mar 2023 18:46:38 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id AD9378009A; Mon, 20 Mar 2023 18:46:32 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id TB9l8anU0pEf; Mon, 20 Mar 2023 18:46:32 +0100 (CET) Received: from [192.168.1.239] (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 059D280079; Mon, 20 Mar 2023 18:46:31 +0100 (CET) Message-ID: Date: Mon, 20 Mar 2023 17:46:23 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Content-Language: en-US References: <87a619u22x.fsf@gmx.com> <873571u0vx.fsf@gmx.com> From: Bruno Victal In-Reply-To: <873571u0vx.fsf@gmx.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: X-Migadu-Queue-Id: A651836B24 X-Spam-Score: -4.25 X-Migadu-Spam-Score: -4.25 X-Migadu-Scanner: scn0.migadu.com List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-TUID: hJ6IZLpdAqZY Hi, On 2023-02-19 15:29, Pierre Langlois wrote: > > Pierre Langlois writes: > > Digging into the container script code, I think the reason is that when > sharing the network, it's supposed to remove any network-related > services from the containerized operating system. And it's not aware of > the new hosts-service-type. The following diff seems to fix the issue: > > --8<---------------cut here---------------start------------->8--- > diff --git a/gnu/system/linux-container.scm b/gnu/system/linux-container.scm > index c2fd55d48e..9190d013bc 100644 > --- a/gnu/system/linux-container.scm > +++ b/gnu/system/linux-container.scm > @@ -49,9 +49,12 @@ (define* (container-essential-services os #:key shared-network?) > (define base > (remove (lambda (service) > (memq (service-kind service) > - (list (service-kind %linux-bare-metal-service) > - firmware-service-type > - system-service-type))) > + (cons* (service-kind %linux-bare-metal-service) > + firmware-service-type > + system-service-type > + (if shared-network? > + (list hosts-service-type) > + '())))) > (operating-system-default-essential-services os))) > > (cons (service system-service-type > --8<---------------cut here---------------end--------------->8--- > > I wonder if this is a full fix though, I see that we also remove network > related configuration files, using `%network-configuration-files', and I > wonder if "/etc/hosts" is still supposed to be there? > > --8<---------------cut here---------------start------------->8--- > (define %network-configuration-files > ;; List of essential network configuration files. > '("/etc/resolv.conf" > "/etc/nsswitch.conf" > "/etc/services" > "/etc/hosts")) > --8<---------------cut here---------------end--------------->8--- /etc/hosts is created by hosts-service-type, so if you remove that service it shouldn't be present anymore. Cheers, Bruno