From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id aLmmI+BFIGTuKgAASxT56A (envelope-from ) for ; Sun, 26 Mar 2023 15:17:20 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id gMN6I+BFIGQ13wAAauVa8A (envelope-from ) for ; Sun, 26 Mar 2023 15:17:20 +0200 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 aspmx1.migadu.com (Postfix) with ESMTPS id 531A63B0EC for ; Sun, 26 Mar 2023 15:17:20 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pgQF6-0003nq-5W; Sun, 26 Mar 2023 09:17:04 -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 1pgQF4-0003ni-Tv for bug-guix@gnu.org; Sun, 26 Mar 2023 09:17: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 1pgQF4-0001GJ-LS for bug-guix@gnu.org; Sun, 26 Mar 2023 09:17:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pgQF4-0000RS-Cb for bug-guix@gnu.org; Sun, 26 Mar 2023 09:17:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#61627: Cannot start a container built with `guix system container --network'. Resent-From: Pierre Langlois Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 26 Mar 2023 13:17: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: Arun Isaac Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Bruno Victal , 61627@debbugs.gnu.org, Pierre Langlois Received: via spool by 61627-submit@debbugs.gnu.org id=B61627.16798365981663 (code B ref 61627); Sun, 26 Mar 2023 13:17:02 +0000 Received: (at 61627) by debbugs.gnu.org; 26 Mar 2023 13:16:38 +0000 Received: from localhost ([127.0.0.1]:44261 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pgQEg-0000Qk-91 for submit@debbugs.gnu.org; Sun, 26 Mar 2023 09:16:38 -0400 Received: from mout.gmx.net ([212.227.17.21]:36233) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pgQEd-0000QW-Ci for 61627@debbugs.gnu.org; Sun, 26 Mar 2023 09:16:36 -0400 Received: from labiere ([82.69.64.142]) by mail.gmx.net (mrgmx105 [212.227.17.174]) with ESMTPSA (Nemesis) id 1MsHru-1qa31Z3LEg-00tmfE; Sun, 26 Mar 2023 15:16:23 +0200 References: <87a619u22x.fsf@gmx.com> <873571u0vx.fsf@gmx.com> <87r0ti9sez.fsf@systemreboot.net> <40ddadcf-6e5d-456f-a59f-371e60e7461d@makinata.eu> <87mt403j7s.fsf@systemreboot.net> User-agent: mu4e 1.8.13; emacs 28.2 From: Pierre Langlois Date: Sun, 26 Mar 2023 14:14:38 +0100 In-reply-to: <87mt403j7s.fsf@systemreboot.net> Message-ID: <87fs9rhcv3.fsf@gmx.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Provags-ID: V03:K1:i3aI3n6Cm6YNnKZfMFO/x1qkmUarxq4EG3Oth//BGEio0+po/FY AMnUY5HrrbJ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 GupBdJTxvFaM6PwlFNCCxtfYE/zLEWOh74AHKNapsVGobXx34wWqw5/gos/MLs3ySuem5NjK0 EliLUjoCrm+CZ+YNPiR1oYSHTYY= 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: 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 ARC-Seal: i=1; s=key1; d=yhetil.org; t=1679836640; a=rsa-sha256; cv=none; b=mCn8JW//BB3ibpc7N7J04xfPa8PKWI2s7mr/w1L/63ZvK/9X5140NKnWEbdCNOejFMiLxB 44L9+2E2lHOx9q3wCgpV6m6IyynqjiLfZ23i8rqPUYTHqRy1ClTWeRg6wnvl2BXmEoseMT lj/FKjT7rmTTgo6Ql9K7/hjS+ZF/yn0vsKrOCReDuOqUxWwcGZrOxmZzAOFFGp7V3071HQ N6W4ABC0Pgv3TmlrRWN8Fupe6BOEM0n+Rl67huItP2w6pvuE2IGAc9cR0n9s9SO+QENH3t R3XX6BlXXcsicW+kxtEzSD7TNtVGBdmCgor4wrd6gkuPUDpVeryM3AU5EThQ7g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmx.com (policy=none); spf=pass (aspmx1.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=1679836640; 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: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=7pA4KkFuaUAynjfHPyteV0G8B7s9vD7LfNHI9PZbcNM=; b=UgwPhVik39lBRJj+wPIY3LL32NiN0QO+HiKY9ogQfxY43vafatqIXUGe386da6mJ9lgl84 M10YKVVpiTsj3tPyLsg4fXvIqQX2cSKmH2XvSqWmdVo0AFi3TikjfmCtle87QZuTZvgcDY GVLbwbs/CJZfUeNSSledbe/yakqdGeXnd25G8BoOWH+2cPYxS6NSMeAgOXKSrjF01377Jf eM37iRTIIF7I9lyBct8B3x9/J6EQ5gbkCsQ9SMTjS2geCvkc4drKZKLg1QYEUD6L4Il17f hyrCBiHbR7Qu4yg8jOtsyAsawBwICyEhle2ZHHDGeRNfPM5DZB0q1KfW0IEa4Q== Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmx.com (policy=none); spf=pass (aspmx1.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" X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -3.83 X-Spam-Score: -3.83 X-Migadu-Queue-Id: 531A63B0EC X-TUID: Gi3vFCmswTwU --=-=-= Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" --==-=-= Content-Type: text/plain Hi Arun and Bruno, Arun Isaac writes: >> I'm inclined to keep it in %network-configuration-files just to be >> safe. > > I agree. I don't really understand the implications of removing > /etc/hosts from %network-configuration-files. I would err on the side of > caution and leave it there for now. That sounds very sensible. > > @Pierre: Could you make a patch of the fix you suggested earlier > (removing hosts-service-type when the --network flag is provided) and > push it? Thank you! Sounds good! Just testing the following patch and will push it in a minute. --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFMBAEBCgA2FiEEctU9gYy29KFyWDdMqPyeRH9PfVQFAmQgRaAYHHBpZXJyZS5s YW5nbG9pc0BnbXguY29tAAoJEKj8nkR/T31UrvAIAJJCduXIVsNgq38GcYUPzyZH AM91Yr6N7CHkWPQvVn0vGI4lfUxuXPeQb2QjP41iUwZGD2eaRJlmxw7FbUX76Npr 33h4ToIza31wBjLtYBeSBrBXEkQaX0i4XD0LuWU4mcNigiBlfzML7wOgpRuu6qte 6qxcjkO3TpgpkDYgimSdt68s8thSeMecPNXr+4TqzyikM6zSTkzzO0goReBQ3x9v fagzSVKzsoByAKnioG5sOiT/tj5yDjSJFdsZD2RmqPfBPUZWU0qZK8TICpOr8zvw ZvdJIdC7CwObz3eWYLlW6oHmN6pjQZh2ywbrmFiUF6OMmpOEPkZMbWY1Di9GblE= =otHo -----END PGP SIGNATURE----- --==-=-=-- --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-linux-container-Remove-hosts-service-type-when-netwo.patch Content-Transfer-Encoding: quoted-printable >From 42fbe62d52a82d1003c3d7039d3c4a46806c5cee Mon Sep 17 00:00:00 2001 Message-Id: <42fbe62d52a82d1003c3d7039d3c4a46806c5cee.1679836531.git.pierre= .langlois@gmx.com> From: Pierre Langlois Date: Sun, 26 Mar 2023 13:55:14 +0100 Subject: [PATCH] linux-container: Remove hosts-service-type when network is shared. Fixes . * gnu/system/linux-container.scm (container-essential-services): When shared-network? is true, remove the hosts-service-type service kind. --- gnu/system/linux-container.scm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/gnu/system/linux-container.scm b/gnu/system/linux-container.scm index c2fd55d48e..409386a84f 100644 --- a/gnu/system/linux-container.scm +++ b/gnu/system/linux-container.scm @@ -5,6 +5,7 @@ ;;; Copyright =C2=A9 2020 Efraim Flashner ;;; Copyright =C2=A9 2020 Google LLC ;;; Copyright =C2=A9 2022 Ricardo Wurmus +;;; Copyright =C2=A9 2023 Pierre Langlois ;;; ;;; This file is part of GNU Guix. ;;; @@ -49,9 +50,12 @@ (define* (container-essential-services os #:key shared-n= etwork?) (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))) =20 (cons (service system-service-type --=20 2.39.2 --=-=-= Content-Type: text/plain Thanks, Pierre --=-=-=--