From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:40400) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gw07M-00064r-5D for guix-patches@gnu.org; Tue, 19 Feb 2019 02:47:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gw07L-0006e6-A2 for guix-patches@gnu.org; Tue, 19 Feb 2019 02:47:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:54500) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gw07L-0006e0-6d for guix-patches@gnu.org; Tue, 19 Feb 2019 02:47:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gw07K-0007l8-KL for guix-patches@gnu.org; Tue, 19 Feb 2019 02:47:02 -0500 Subject: [bug#28128] [PATCH] scripts: system: Add support for container network sharing. Resent-Message-ID: From: Arun Isaac In-Reply-To: <20170817191334.26269-1-mail@cbaines.net> References: <20170817191334.26269-1-mail@cbaines.net> Date: Tue, 19 Feb 2019 13:16:12 +0530 Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 28128@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable I need this feature and I'd like to see this patch completed. And, I'm willing to adopt it if Christopher Baines is unable to find time for it. May I? > =E2=80=9Cwait, it doesn=E2=80=99t feel right to pass that argument around > everywhere!=E2=80=9D. :-) >=20 > We already have that with #:container?, and I think that=E2=80=99s a bit = of a > problem. Yes, it doesn't feel right to pass the #:container? and #:container-shared-network? argument around everywhere. We should do something more elegant. > The =E2=80=98linux-bare-metal=E2=80=99 service addresses it somewhat in a > more elegant way, I think. >=20 > What about this: >=20 > 1. Remove from =E2=80=98operating-system-etc-service=E2=80=99 all the > shared-network-related files; >=20 > 2. Add a =E2=80=98shared-network-service=E2=80=99 that simply adds thos= e file to > /etc; >=20 > 3. Add a =E2=80=98containerized-operating-system=E2=80=99 that removes = it. >=20 > There=E2=80=99s the problem, though, that /etc/hosts can only be added fr= om > =E2=80=98essential-services=E2=80=99. I tried the above, but since /etc/hosts can only be added from essential-services, we still have to pass around the #:container-shared-network? argument a lot. What if, instead of a flag to `guix system', we introduced two fields -- container? and container-shared-network? -- in the record type? This way, all the information would be bundled into the `os' argument of essential-services and other functions. We wouldn't need additional keyword arguments like #:container? and #:container-shared-network?. In the interest of backward compatibility and convenience, we could also retain the existing flags to the `guix system' script. When the script sees the flag, it could modify the operating-system record accordingly before passing it on for further processing. Thoughts? --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEf3MDQ/Lwnzx3v3nTLiXui2GAK7MFAlxrtEUACgkQLiXui2GA K7Oamwf+LQr4iCvb0Dzsyphi2+YYpibNsKdBoT5lxGlVp+YozGV0n7ypF2mfYCKv qumI3BBjY3Y0cuCbEBUdFZ/iUGtNJ+62RwqInPIECNhnPQd8KErFNdXIGmXpIOT9 CdNif9FsdaqR7mORQX3riwOUnOSZ1cyrIkpkzzOh/t7PwEVTkZcE1/0P0XG7s5qb SFhwR1NDmnOZS5MaJc8L2RLMjQ40gm25N3SErFq+BszPxRS2H5cBtAvQ2Li54TQQ cGml9EjQKUDhA9kzJCaoHTB1arGUI+u+1SeUZEuSNUl6M9Xd4S6X9WuX4MkPtRqu CmymoBckeJ/GYMqNJ05baJIl9EC5tg== =M8lX -----END PGP SIGNATURE----- --=-=-=--