From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:32791) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h5nrU-0000x0-7A for guix-patches@gnu.org; Mon, 18 Mar 2019 04:43:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h5nnT-0004EG-4T for guix-patches@gnu.org; Mon, 18 Mar 2019 04:39:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:34485) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h5nnS-0004Cu-RT for guix-patches@gnu.org; Mon, 18 Mar 2019 04:39:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1h5nnS-00049P-Ik for guix-patches@gnu.org; Mon, 18 Mar 2019 04:39:02 -0400 Subject: [bug#28128] [PATCH 2/2] scripts: system: Support container network sharing. Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20190313093610.1071-1-arunisaac@systemreboot.net> <20190313093610.1071-3-arunisaac@systemreboot.net> <87va0n80u5.fsf@gnu.org> Date: Mon, 18 Mar 2019 09:37:59 +0100 In-Reply-To: (Arun Isaac's message of "Fri, 15 Mar 2019 01:41:25 +0530") Message-ID: <874l80tw60.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: Arun Isaac Cc: 28128@debbugs.gnu.org Hi, Arun Isaac skribis: >> 2. The notion of =E2=80=9Cshared network=E2=80=9D is very much a conta= iner (or VM) >> thing, so somehow it still doesn=E2=80=99t feel right to me that (g= nu >> system) has to be aware of these special cases. >> >> I think the =E2=80=98host-database-service-type=E2=80=99 wouldn=E2=80=99= t have this problem, but >> maybe it has other issues. I guess this needs more experimentation, >> sorry for not coming up with clearer ideas! > > If these services (the shared-network service, the hosts-database > service or indeed any other service) had access to the operating-system > object `os', then they would be able to operate independently without > having to be extended by `essential-services'. Is this possible somehow? > Is it a good idea to give services access to the os fields? It=E2=80=99s not easily possible, and I think it would be a bad idea: if ev= ery service has access to every =E2=80=98operating-system=E2=80=99 field, that = gives you more flexibility, but it=E2=80=99s also much harder to reason about what happens, compared to the current extension graph (the NixOS =E2=80=9Cmodule= =E2=80=9D system works like that: every service can access every bit of the whole configuration, but IMO that makes it quite hard to understand.) What could be useful is =E2=80=9Cself-referential=E2=80=9D records, where a= field can refer to the record it belongs do. So we=E2=80=99d do: (define-record-type* ;; =E2=80=A6 (services operating-system-services (self-referential? #t) (default essential-services))) whereby =E2=80=98essential-services=E2=80=99 would be passed the record somehow. That needs more thought=E2=80=A6 Thanks, Ludo=E2=80=99.