unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#22753: Shepherd: Problem reconfiguring from bare-bones to desktop
@ 2016-02-21  8:24 Mark H Weaver
  2016-02-25 12:01 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Mark H Weaver @ 2016-02-21  8:24 UTC (permalink / raw)
  To: 22753

Recently, I temporarily switched to a minimal text-only configuration of
GuixSD (in order to avoid using glibc without the CVE-2015-7547 fix).

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:

--8<---------------cut here---------------start------------->8---
making '/gnu/store/q9k5c12m65l19jcpx8fm213jk542pi9m-system' the current system...
guix system: loading new services: ntpd elogind upower-daemon networking avahi-daemon xorg-server bitlbee tor...
guix system: shepherd: Evaluating user expression (register-services (primitive-load "/gn...") ...).
guix system: error: exception caught while executing 'eval' on service 'root':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-daemon' could not be foundguix system: error: service 'networking' could not be foundguix system: error: service 'avahi-daemon' could not be foundguix system: error: service 'xorg-server' could not be foundguix system: error: service 'bitlbee' could not be foundguix system: error: service 'tor' could not be foundroot:~#
--8<---------------cut here---------------end--------------->8---

The text above was transcribed by hand from one text console to another,
so it might contain mistakes.

     Mark

^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#22753: Shepherd: Problem reconfiguring from bare-bones to desktop
  2016-02-21  8:24 bug#22753: Shepherd: Problem reconfiguring from bare-bones to desktop Mark H Weaver
@ 2016-02-25 12:01 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2016-02-25 12:01 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: 22753-done

Mark H Weaver <mhw@netris.org> 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 system...
> guix system: loading new services: ntpd elogind upower-daemon networking avahi-daemon xorg-server bitlbee tor...
> guix system: shepherd: Evaluating user expression (register-services (primitive-load "/gn...") ...).
> guix system: error: exception caught while executing 'eval' on service 'root':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-daemon' could not be foundguix system: error: service 'networking' could not be foundguix system: error: service 'avahi-daemon' could not be foundguix system: error: service 'xorg-server' could not be foundguix system: error: service 'bitlbee' could not be foundguix system: error: service 'tor' could not be foundroot:~#

The missing newlines were added in f2d8faf.

What’s happening here is that ‘guix system’ 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 “could not be found”
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 ‘upgrade-shepherd-services’:

--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’t there before but it explains the story: we call
‘shepherd-service-file’ here and normally, that gives us the 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’re trying to load is
missing.)

It turns out that ‘shepherd-service-file’ was computing a slightly
different derivation for torrc and all these files.  The difference was
that it was using a different utils.scm file (for instance) in its
‘module-import’ and ‘module-import-compiled’ derivations induced by
‘gexp->derivation’.

The reason it was using a different utils.scm (namely
/gnu/store/…-utils.scm instead of /home/ludo/…/utils.scm) is that
the activation script, which is run just before
‘upgrade-shepherd-services’ is called, modified ‘%load-path’.

I’m 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’.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-02-25 12:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-21  8:24 bug#22753: Shepherd: Problem reconfiguring from bare-bones to desktop Mark H Weaver
2016-02-25 12:01 ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).