From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: weird errors; shepherd Date: Wed, 24 Jan 2018 23:28:52 +0100 Message-ID: <87tvvavql7.fsf@gnu.org> References: <87a7xhmpht.fsf@gnu.org> <20180114114346.78977872@scratchpost.org> <20180122115908.588a1d06@scratchpost.org> <20180122200146.545ef7f6@scratchpost.org> <20180123234318.3463d51d@scratchpost.org> <87zi53xqiz.fsf@gnu.org> <20180124203652.75d95d48@scratchpost.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]:39146) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eeTXP-0003dG-44 for guix-devel@gnu.org; Wed, 24 Jan 2018 17:29:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eeTXN-0004N8-Mb for guix-devel@gnu.org; Wed, 24 Jan 2018 17:28:59 -0500 Received: from hera.aquilenet.fr ([2a0c:e300::1]:49098) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eeTXN-0004M9-Af for guix-devel@gnu.org; Wed, 24 Jan 2018 17:28:57 -0500 In-Reply-To: <20180124203652.75d95d48@scratchpost.org> (Danny Milosavljevic's message of "Wed, 24 Jan 2018 20:36:52 +0100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Danny Milosavljevic Cc: guix-devel Danny Milosavljevic skribis: > On Wed, 24 Jan 2018 15:47:16 +0100 > ludo@gnu.org (Ludovic Court=C3=A8s) wrote: > >> I=E2=80=99m not sure what you mean. There=E2=80=99s no notion of depend= encies among >> activation snippets, let alone between activation snippets and service >> starts (when booting, activation snippets run *before* shepherd is >> started). Perhaps there=E2=80=99s 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=E2=80=99s 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 lea= ve stdout >> > and stderr alone. So where does the text go?=20=20 >>=20 >> To PID 1=E2=80=99s stdout/stderr, i.e., /dev/console (which sucks). > > Really? I don't see it in the marionette os output (for make check-syste= m) -=20 When running =E2=80=9Cmake check-system=E2=80=9D, you see the console (whic= h is redirected to the host=E2=80=99s qemu stdout), like this: --8<---------------cut here---------------start------------->8--- $ make check-system TESTS=3Dbasic [...] [ 0.511024] Freeing unused kernel memory: 308K GC Warning: pthread_getattr_np or pthread_attr_getstack failed for main thr= ead 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 . + info --version info (GNU texinfo) 6.3 Copyright (C) 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later 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 ter= m-tty3 term-tty1 console-font-tty6 urandom-seed file-system-/dev/shm consol= e-font-tty5 console-font-tty1 guix-daemon host-name file-system-/dev/pts us= er-file-systems root term-tty4 file-systems user-homes root-file-system nsc= d marionette syslogd term-tty6 term-tty5 console-font-tty4 console-font-tty= 3)) # 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 =E2=80=98useradd=E2=80=99, 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=E2=80=99t be necessary, but it would change the error port for= the marionette process itself. >> That=E2=80=99s inconvenient but =E2=80=9Cexpected=E2=80=9D in the sense = that the =E2=80=98start=E2=80=99 method >> is called right from shepherd.conf. Perhaps we should call =E2=80=98sta= rt=E2=80=99 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=E2=80=99.