[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#28128] [PATCH 2/2] scripts: system: Support container network shari
From: |
Ludovic Courtès |
Subject: |
[bug#28128] [PATCH 2/2] scripts: system: Support container network sharing. |
Date: |
Mon, 18 Mar 2019 09:37:59 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
Hi,
Arun Isaac <address@hidden> skribis:
>> 2. The notion of “shared network” is very much a container (or VM)
>> thing, so somehow it still doesn’t feel right to me that (gnu
>> system) has to be aware of these special cases.
>>
>> I think the ‘host-database-service-type’ wouldn’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’s not easily possible, and I think it would be a bad idea: if every
service has access to every ‘operating-system’ field, that gives you
more flexibility, but it’s also much harder to reason about what
happens, compared to the current extension graph (the NixOS “module”
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 “self-referential” records, where a field can
refer to the record it belongs do. So we’d do:
(define-record-type* <operating-system>
;; …
(services operating-system-services
(self-referential? #t) (default essential-services)))
whereby ‘essential-services’ would be passed the <operating-system>
record somehow.
That needs more thought…
Thanks,
Ludo’.
[bug#28128] [PATCH 1/2] shepherd: Move nscd-socket to (gnu system file-systems)., Arun Isaac, 2019/03/13