all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Danny Milosavljevic <dannym@scratchpost.org>
Cc: guix-devel@gnu.org
Subject: Re: 02/02: services: docker: Depend on elogind.
Date: Thu, 10 Jan 2019 23:13:24 +0100	[thread overview]
Message-ID: <87ftu088l7.fsf@gnu.org> (raw)
In-Reply-To: <20190110135836.108c1e4a@scratchpost.org> (Danny Milosavljevic's message of "Thu, 10 Jan 2019 13:58:36 +0100")

[-- Attachment #1: Type: text/plain, Size: 1396 bytes --]

Hi,

Danny Milosavljevic <dannym@scratchpost.org> 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:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 566 bytes --]

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))

[-- Attachment #3: Type: text/plain, Size: 95 bytes --]


The duplicate entries would still appear in /etc/fstab, but maybe that’s
OK.

Ludo’.

      parent reply	other threads:[~2019-01-10 22:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190110041548.28584.50889@vcs0.savannah.gnu.org>
     [not found] ` <20190110041549.3E254204E8@vcs0.savannah.gnu.org>
2019-01-10  8:59   ` 02/02: services: docker: Depend on elogind Ludovic Courtès
2019-01-10 12:58     ` Danny Milosavljevic
2019-01-10 13:57       ` Danny Milosavljevic
2019-01-10 22:13       ` Ludovic Courtès [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ftu088l7.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=dannym@scratchpost.org \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.