guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 02/02: services: docker: Depend on elogind.


From: Ludovic Courtès
Subject: Re: 02/02: services: docker: Depend on elogind.
Date: Thu, 10 Jan 2019 23:13:24 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Hi,

Danny Milosavljevic <address@hidden> skribis:

>> Should it depend on ‘file-system-/sys/fs/cgroup/elogind’, or maybe both
>> ‘elogind’ and ‘file-system-/sys/fs/cgroup/elogind’?  Depends on what it
>> expects from elogind I guess…
>
> Oh!
>
> I think Docker doesn't expect anything from elogind.
>
> Docker uses these cgroups and these capabilities:
>
> * "memory": memory limit
> * "memory": swap limit
> * "memory": memory swappiness
> * "memory": memory soft limit
> * "memory": kernel memory limit
> * "pids": pids limit
> * "cpu": cpu cfs period/quota
> * "cpu": CPU shares
> * "cpu": CPU cfs
> * "cpuset": cpus, mems
> * "blkio": Block I/O weight
> * "blkio": BPS Block I/O read limit
> * "blkio": BPS Block I/O write limit
> * "blkio": IOPS Block I/O read limit
> * "blkio": IOPS Block I/O write limit
> * "devices": List devices
>
> Can I just repeat
>
>  (service-extension file-system-service-type (const %elogind-file-systems))
>
> [or a subset thereof]
>
> in the docker service type and not have to have elogind in the config
> at all?  Is that safe?  (i.e. will it mount the file systems just once?)

I was just suggesting to change the ‘requirements’ field of the Shepherd
service itself.

Now, you could also do what you say, but to avoid the “provided more
than once” error, we probably need this:

diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 6e99cbfec4..9fe0710717 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -465,7 +465,8 @@ FILE-SYSTEM."
 
 (define (file-system-shepherd-services file-systems)
   "Return the list of Shepherd services for FILE-SYSTEMS."
-  (let* ((file-systems (filter file-system-mount? file-systems)))
+  (let* ((file-systems (filter file-system-mount?
+                               (delete-duplicates file-systems))))
     (define sink
       (shepherd-service
        (provision '(file-systems))
The duplicate entries would still appear in /etc/fstab, but maybe that’s
OK.

Ludo’.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]