From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#22753: Shepherd: Problem reconfiguring from bare-bones to desktop Date: Thu, 25 Feb 2016 13:01:47 +0100 Message-ID: <87d1rlathw.fsf@gnu.org> References: <8760xisc7f.fsf@netris.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36314) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYucR-0003HB-UQ for bug-guix@gnu.org; Thu, 25 Feb 2016 07:02:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aYucM-0007HC-4m for bug-guix@gnu.org; Thu, 25 Feb 2016 07:02:07 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:47740) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYucM-0007H2-25 for bug-guix@gnu.org; Thu, 25 Feb 2016 07:02:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aYucL-0005Ir-SI for bug-guix@gnu.org; Thu, 25 Feb 2016 07:02:01 -0500 Sender: "Debbugs-submit" Resent-To: bug-guix@gnu.org Resent-Message-ID: In-Reply-To: <8760xisc7f.fsf@netris.org> (Mark H. Weaver's message of "Sun, 21 Feb 2016 03:24:20 -0500") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Mark H Weaver Cc: 22753-done@debbugs.gnu.org Mark H Weaver skribis: > When I later build a full desktop system and reconfigured, several > errors were reported by shepherd while attempting to update the running > services, and some messages were missing trailing newlines. Here's the > tail of the console output: > > making '/gnu/store/q9k5c12m65l19jcpx8fm213jk542pi9m-system' the current s= ystem... > guix system: loading new services: ntpd elogind upower-daemon networking = avahi-daemon xorg-server bitlbee tor... > guix system: shepherd: Evaluating user expression (register-services (pri= mitive-load "/gn...") ...). > guix system: error: exception caught while executing 'eval' on service 'r= oot':ERROR: In procedure open-file: No such file or directory: "/gnu/store/= w5p4sxbwsmj1q9g95j4q909g6hwiksql-shepherd-tor.scm" > Installation finished. No Error reported. > guix system: error: service 'ntpd' could not be foundguix system: error: = service 'elogind' could not be foundguix system: error: service 'upower-dae= mon' could not be foundguix system: error: service 'networking' could not b= e foundguix system: error: service 'avahi-daemon' could not be foundguix sy= stem: error: service 'xorg-server' could not be foundguix system: error: se= rvice 'bitlbee' could not be foundguix system: error: service 'tor' could n= ot be foundroot:~# The missing newlines were added in f2d8faf. What=E2=80=99s happening here is that =E2=80=98guix system=E2=80=99 passes = shepherd a list of files to load (one file per service), but some of these files happen to be nonexistent (notably shepherd-tor.scm.) Because of that, it does not even load subsequent service files. Nevertheless, it happily tries to start all these services that failed to be loaded, which results in this series of =E2=80=9Ccould not be found= =E2=80=9D messages. (We should probably load services one at a time and keep track of which one failed exactly.) The service file names are computed in =E2=80=98upgrade-shepherd-services= =E2=80=99: --8<---------------cut here---------------start------------->8--- (let ((to-load-names (map shepherd-service-canonical-name to-load)) (to-start (filter shepherd-service-auto-start? to-load))) (info (_ "loading new services:~{ ~a~}...~%") to-load-names) (mlet %store-monad ((files (mapm %store-monad shepherd-service-file to-load))) ;; Here we assume that FILES are exactly those that were computed ;; as part of the derivation that built OS, which is normally the ;; case. (load-services (map derivation->output-path files)) --8<---------------cut here---------------end--------------->8--- The comment wasn=E2=80=99t there before but it explains the story: we call =E2=80=98shepherd-service-file=E2=80=99 here and normally, that gives us th= e same result as what was already computed when building OS. However, that assumption turned out to be wrong in some cases, hence the error you got (the shepherd-tor.scm file we=E2=80=99re trying to load is missing.) It turns out that =E2=80=98shepherd-service-file=E2=80=99 was computing a s= lightly different derivation for torrc and all these files. The difference was that it was using a different utils.scm file (for instance) in its =E2=80=98module-import=E2=80=99 and =E2=80=98module-import-compiled=E2=80= =99 derivations induced by =E2=80=98gexp->derivation=E2=80=99. The reason it was using a different utils.scm (namely /gnu/store/=E2=80=A6-utils.scm instead of /home/ludo/=E2=80=A6/utils.scm) i= s that the activation script, which is run just before =E2=80=98upgrade-shepherd-services=E2=80=99 is called, modified =E2=80=98%l= oad-path=E2=80=99. I=E2=80=99m not sure the above explanation is crystal clear, but suffice to= say that this is fixed in cfd5032. :-) Anyway, this was a good stress test. Thanks, Ludo=E2=80=99.