From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id VJqBAtyk1V7IZQAA0tVLHw (envelope-from ) for ; Tue, 02 Jun 2020 01:01:16 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id aHRsOduk1V6mEgAAB5/wlQ (envelope-from ) for ; Tue, 02 Jun 2020 01:01:15 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 7432C9401AE for ; Tue, 2 Jun 2020 01:01:15 +0000 (UTC) Received: from localhost ([::1]:60178 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jfvIn-0004HI-0g for larch@yhetil.org; Mon, 01 Jun 2020 21:01:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33962) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfvHf-0003SA-BX for bug-guix@gnu.org; Mon, 01 Jun 2020 21:00:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54079) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jfvHe-0001wZ-TW for bug-guix@gnu.org; Mon, 01 Jun 2020 21:00:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jfvHe-00073c-T7 for bug-guix@gnu.org; Mon, 01 Jun 2020 21:00:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#38432: dockerd is not started automatically Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 02 Jun 2020 01:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38432 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Danny Milosavljevic Received: via spool by 38432-submit@debbugs.gnu.org id=B38432.159105960027090 (code B ref 38432); Tue, 02 Jun 2020 01:00:02 +0000 Received: (at 38432) by debbugs.gnu.org; 2 Jun 2020 01:00:00 +0000 Received: from localhost ([127.0.0.1]:37392 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jfvHb-00072s-UA for submit@debbugs.gnu.org; Mon, 01 Jun 2020 21:00:00 -0400 Received: from mail-qk1-f174.google.com ([209.85.222.174]:42673) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jfvHZ-00072d-Re for 38432@debbugs.gnu.org; Mon, 01 Jun 2020 20:59:58 -0400 Received: by mail-qk1-f174.google.com with SMTP id s1so11012143qkf.9 for <38432@debbugs.gnu.org>; Mon, 01 Jun 2020 17:59:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=PfV6kVwkz3o5bPk48TVHK6bioqDMYGYs3qnKVMGions=; b=cw+Exgnf9zWcfMIp3zAdDJNkvnkddA4njkFnIyz3meji6LnUJ6JiKpS1ilVxSXFvOb 3A9lRpBseb9u5/WLBHyr9pjatQ+sJmpdMYcdi+mxYk8f9X0C9nFc1jFHaXxrvo87KAff 6MI9d9Za++wItOyRRK2Tq9HWJ0nsxP02wVrTGsHJ5Se/TgV3RNtdIg4JhnOtdO6mqHi6 WCctZq7UuyRuaLgR94Kx45E86SabCxRdIhvShDDzg4VIvbupxXzrr8HUmqAwDBdMdjx1 nMORivMoWT2W1CSDvNBb/nbRqDiuyeKDL806sr0gPoyQ2i4yeTTGUsbEHLqHjAnZ4ha6 Fzlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=PfV6kVwkz3o5bPk48TVHK6bioqDMYGYs3qnKVMGions=; b=OW0v8wJtTLbFeIpMV1fyyYPObbbM4FYmIq88h8Up/qd4Ke62xPY/CZrioQxM3uo8LK o9x3q/DMkU4SaB439wPU9enl0FLw3t0Cnn7WmZaI1aJeIxImvEWojT2bkaY5vi7zqEj6 YfHUnaWH1MJBUkTQwtpI40YcxXMItW1R6pKLiqKPJlMKzx3Y2GOuDAeCNs9cVrP9tNBE tzjU3WItpA3RbWVYeBaTJj6qtjv7WrmbUqRu32sOxLM5j69v8Y5cf5SXYnFPDURp/ydp OObUOQup0LKFOFzLIldxbxV1cPFKV5Bp3W9xTY0oCGSnD9guA4vGwfKT1WnvqbN4uo+1 6Blg== X-Gm-Message-State: AOAM530snh520n1mTKI4LkgHc/AfMbLLxlE/9N+aTp1gsW2F57isJTzu Nisd8/jtr930e9fRoNTXft1Wq5WmZDtxuQ== X-Google-Smtp-Source: ABdhPJy9sTDeD8nskBxkI2X4nSBtPk8j3MjRSF/7xf/MAGdBLTWZIiKZ34sZhtVMhukAebEtC2o3Zw== X-Received: by 2002:a37:aa87:: with SMTP id t129mr22698316qke.197.1591059591989; Mon, 01 Jun 2020 17:59:51 -0700 (PDT) Received: from hurd (dsl-10-148-140.b2b2c.ca. [72.10.148.140]) by smtp.gmail.com with ESMTPSA id g51sm1023147qtb.69.2020.06.01.17.59.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jun 2020 17:59:51 -0700 (PDT) From: Maxim Cournoyer References: <20191129220610.GA12535@SDF.ORG> <87d06o5h05.fsf@gmail.com> <20200528154133.68781722@scratchpost.org> <87eeqz5uu5.fsf@gmail.com> <20200601142454.5a45c75c@scratchpost.org> Date: Mon, 01 Jun 2020 20:59:50 -0400 In-Reply-To: <20200601142454.5a45c75c@scratchpost.org> (Danny Milosavljevic's message of "Mon, 1 Jun 2020 14:24:54 +0200") Message-ID: <87h7vunuyh.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: andreoss@SDF.ORG, 38432@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=gmail.com header.s=20161025 header.b=cw+Exgnf; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Spam-Score: 0.09 X-TUID: gYFpm2wGUH6z --=-=-= Content-Type: text/plain Hi Danny! Danny Milosavljevic writes: > Hi Maxim, > > On Sun, 31 May 2020 23:27:30 -0400 > Maxim Cournoyer wrote: > >> time="2020-05-31T22:28:15.885343166-04:00" level=warning msg="failed >> to load plugin io.containerd.snapshotter.v1.aufs" error="modprobe >> aufs failed: "modprobe: FATAL: Module aufs not found in directory >> /lib/modules/5.4.43-gnu\n": exit status 1" > > We don't have aufs, but it's not mandatory anyway. > >> The only new lines to appear in docker.log following my last reboot are: >> >> --8<---------------cut here---------------start------------->8--- >> time="2020-05-31T22:28:13.579626539-04:00" level=info msg="Starting up" >> failed to start containerd: exec: "containerd": executable file not found in $PATH >> --8<---------------cut here---------------end--------------->8--- >> >> So, it seems the failure is related to kernel modules not being found >> where they are looked for? > > I don't think so this time, at least according to these logs. > > Could it be that containerd takes too long to start up or something? And then it > tries to start it on its own? > > To find out, try adding sleep to gnu/services/docker.scm docker-shepherd-service > before make-forkexec-constructor, to make it read > > #~(begin > (sleep 2) > (make-forkexec-constructor .... It looks like this! Which is weird, because containerd doesn't take much time to start, even when networking is not yet functional (I suspected something like this at first). I wonder what we can do here... looks like we need to poll containerd to know when it's ready in the start procedure of dockerd (unless I'm missing something fancier that Shepherd would allow doing). Else we could let dockerd spawn its own containerd daemon, which it can do if we tell it where it is. Thoughts? I've made the following changes while troubleshooting this. It only printed a couple more lines, but I guess it's nice to have: --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-gnu-services-docker-Add-a-debug-parameter.patch >From 80f3812e36cfb738b494343c5a6c20cb65588ad1 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Mon, 1 Jun 2020 20:54:40 -0400 Subject: [PATCH] gnu: services: docker: Add a debug? parameter. * gnu/services/docker.scm (docker-configuration): Add a debug? field. (containerd-shepherd-service): Pass the "--log-level=debug" argument when DEBUG? is true. (docker-shepherd-service): Pass the "--debug" and "--log-level=debug" arguments when DEBUG? is true. --- doc/guix.texi | 9 +++++++++ gnu/services/docker.scm | 19 +++++++++++++++---- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index beeda34ea2..de958c9cf1 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -26287,6 +26287,15 @@ The Docker package to use. @item @code{containerd} (default: @var{containerd}) The Containerd package to use. +@item @code{proxy} (default @var{docker-libnetwork-cmd-proxy}) +The Docker user-land networking proxy package to use. + +@item @code{enable-proxy?} (default @code{#f}) +Enable or disable the use of the Docker user-land networking proxy. + +@item @code{debug?} (default @code{#f}) +Enable or disable debug output. + @end table @end deftp diff --git a/gnu/services/docker.scm b/gnu/services/docker.scm index d6dc792821..ccdb67ed73 100644 --- a/gnu/services/docker.scm +++ b/gnu/services/docker.scm @@ -52,7 +52,10 @@ loop-back communications.") (enable-proxy? (boolean #t) - "Enable or disable the user-land proxy (enabled by default).")) + "Enable or disable the user-land proxy (enabled by default).") + (debug? + (boolean #f) + "Enable or disable debug output.")) (define %docker-accounts (list (user-group (name "docker") (system? #t)))) @@ -71,19 +74,24 @@ loop-back communications.") (mkdir-p #$state-dir)))) (define (containerd-shepherd-service config) - (let* ((package (docker-configuration-containerd config))) + (let* ((package (docker-configuration-containerd config)) + (debug? (docker-configuration-debug? config))) (shepherd-service (documentation "containerd daemon.") (provision '(containerd)) (start #~(make-forkexec-constructor - (list (string-append #$package "/bin/containerd")) + (list (string-append #$package "/bin/containerd") + #$@(if debug? + '("--log-level=debug") + '())) #:log-file "/var/log/containerd.log")) (stop #~(make-kill-destructor))))) (define (docker-shepherd-service config) (let* ((docker (docker-configuration-docker config)) (enable-proxy? (docker-configuration-enable-proxy? config)) - (proxy (docker-configuration-proxy config))) + (proxy (docker-configuration-proxy config)) + (debug? (docker-configuration-debug? config))) (shepherd-service (documentation "Docker daemon.") (provision '(dockerd)) @@ -101,6 +109,9 @@ loop-back communications.") (start #~(make-forkexec-constructor (list (string-append #$docker "/bin/dockerd") "-p" "/var/run/docker.pid" + #$@(if debug? + '("--debug" "--log-level=debug") + '()) (if #$enable-proxy? "--userland-proxy" "") "--userland-proxy-path" (string-append #$proxy "/bin/proxy")) -- 2.26.2 --=-=-= Content-Type: text/plain Maxim --=-=-=--