all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Danny Milosavljevic <dannym@scratchpost.org>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: weird errors; shepherd
Date: Wed, 24 Jan 2018 23:28:52 +0100	[thread overview]
Message-ID: <87tvvavql7.fsf@gnu.org> (raw)
In-Reply-To: <20180124203652.75d95d48@scratchpost.org> (Danny Milosavljevic's message of "Wed, 24 Jan 2018 20:36:52 +0100")

Danny Milosavljevic <dannym@scratchpost.org> skribis:

> On Wed, 24 Jan 2018 15:47:16 +0100
> ludo@gnu.org (Ludovic Courtès) wrote:
>
>> I’m not sure what you mean.  There’s no notion of dependencies among
>> activation snippets, let alone between activation snippets and service
>> starts (when booting, activation snippets run *before* shepherd is
>> started).  Perhaps there’s a misunderstanding here?
>
> Yeah, if it's intended that way, that's fine.  So it's like /etc/rc.local
> and it just runs the snippets in any order?

Yes.

> Now, I just do both the trytond DB-upgrading and the service starting at the
> "start" action because postgres isn't running yet otherwise.

That’s the right thing to do if you need ordering.

>> >   As far as I understand make-forkexec-constructor takes special care not
>> >   to kill stderr.  As long there's no log-file specified it should leave stdout
>> >   and stderr alone.  So where does the text go?  
>> 
>> To PID 1’s stdout/stderr, i.e., /dev/console (which sucks).
>
> Really?  I don't see it in the marionette os output (for make check-system) - 

When running “make check-system”, you see the console (which is
redirected to the host’s qemu stdout), like this:

--8<---------------cut here---------------start------------->8---
$ make check-system TESTS=basic

[...]

[    0.511024] Freeing unused kernel memory: 308K
GC Warning: pthread_getattr_np or pthread_attr_getstack failed for main thread
GC Warning: Couldn't read /proc/stat
Welcome, this is GNU's early boot Guile.
Use '--repl' for an initrd REPL.

loading kernel modules...

[...]

adding group 'input'...
adding group 'video'...
adding group 'audio'...
adding group 'netdev'...
adding group 'lp'...
adding group 'disk'...
adding group 'floppy'...

[...]

Service udev has been started.
Service urandom-seed has been started.
Service user-processes has been started.
Service host-name has been started.
Service user-homes could not be started.
nscd: 279 monitoring file `/etc/hosts` (1)
nscd: 279 monitoring directory `/etc` (2)
nscd: 279 monitoring file `/etc/resolv.conf` (3)
nscd: 279 monitoring directory `/etc` (2)
nscd: 279 monitoring file `/etc/services` (4)
nscd: 279 monitoring directory `/etc` (2)
Service nscd has been started.

[...]

Written by Mike Haertel and others, see <http://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>.
+ info --version
info (GNU texinfo) 6.3

Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
shepherd: Service user-homes could not be started.
QEMU runs as PID 6
connected to QEMU's monitor
read QEMU monitor prompt
connected to guest REPL
%%%% Starting test basic  (Writing full log to "basic.log")
marionette is ready

;;; (services (user-processes loopback term-tty2 udev console-font-tty2 term-tty3 term-tty1 console-font-tty6 urandom-seed file-system-/dev/shm console-font-tty5 console-font-tty1 guix-daemon host-name file-system-/dev/pts user-file-systems root term-tty4 file-systems user-homes root-file-system nscd marionette syslogd term-tty6 term-tty5 console-font-tty4 console-font-tty3))
# of expected passes      19
@ build-succeeded /gnu/store/xab6i89lf15rab8ipy78rkj4218dzjvd-basic.drv -
TOTAL: 1
PASS: /gnu/store/hazdppnr6cd1dhqnbjhyj44yb6xcfpnf-basic
--8<---------------cut here---------------end--------------->8---

Here you see the output of ‘useradd’, shepherd itself, nscd, marionette,
etc.  All this is /dev/console.

> Also tried
>                     (marionette-eval '(current-output-port
>                                                  (open-file "/dev/console" "w0"))
>                                                                             marionette)
>                     (marionette-eval '(current-error-port
>                                                  (open-file "/dev/console" "w0"))
>                                                                             marionette)

This shouldn’t be necessary, but it would change the error port for the
marionette process itself.

>> That’s inconvenient but “expected” in the sense that the ‘start’ method
>> is called right from shepherd.conf.  Perhaps we should call ‘start’ at a
>> later stage.
>
> Well, as it is it makes the system very brittle.
>
> Once one service does that... oops.

Yeah, but then again we test services in a VM beforehand.  :-)
Also, using (error "xxx") is frowned upon because it raises an exception
that cannot usefully be handled.

Ludo’.

  reply	other threads:[~2018-01-24 22:29 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-13 17:00 weird errors Catonano
2018-01-13 21:13 ` Ludovic Courtès
2018-01-14  7:21   ` Catonano
2018-01-14 10:43     ` Danny Milosavljevic
2018-01-14 10:57       ` Danny Milosavljevic
2018-01-14 11:00       ` Catonano
2018-01-14 16:38         ` Ricardo Wurmus
2018-01-14 20:35           ` Catonano
2018-01-14 16:45         ` Danny Milosavljevic
2018-01-14 20:33           ` Catonano
2018-01-15  5:43           ` Alex Vong
2018-01-22 10:52         ` Catonano
2018-01-22 10:59           ` Danny Milosavljevic
2018-01-22 12:42             ` Catonano
2018-01-22 19:01               ` Danny Milosavljevic
2018-01-22 20:37                 ` Catonano
2018-01-23 22:43                   ` weird errors; shepherd Danny Milosavljevic
2018-01-24 12:34                     ` Catonano
2018-01-24 12:46                       ` Danny Milosavljevic
2018-01-24 12:52                         ` Catonano
2018-01-24 14:47                     ` Ludovic Courtès
2018-01-24 19:36                       ` Danny Milosavljevic
2018-01-24 22:28                         ` Ludovic Courtès [this message]
2018-01-29  7:24                     ` Catonano

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=87tvvavql7.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.