Re: [systemd-devel] systemd-sysv-generator bug ?

2016-11-21 Thread Cédric BRINER
Hi,

We have been through a lot of tests, trying to make it reproductible
with some easy scripts. You'll see at the bottom of this email, some
links on the scripts used, what we have typed in our console, and the
output of journalctl -b -1

> systemd will only stop services at shutdown that are running. That
> means you need to make sure your SysV script is properly hooked into
> the start runlevels too, even if its start verb is just a nop.
Mixing your comment, and the one from Reindl HARALD, we have a
sysv-test.service which has /usr/bin/true for ExecStart, and a
stop-sysv-test.bash for ExecStop which stops a daemon launched within
the console.

Before the init 6 we had:
# systemctl status sysv-test
● sysv-test.service - sysv-test
   Loaded: loaded (/etc/systemd/system/sysv-test.service; enabled;
vendor preset: disabled)
   Active: active (exited) since lun 2016-11-21 15:03:23 CET; 12min ago
 Main PID: 2562 (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/sysv-test.service

nov 21 15:03:23 beryl5 systemd[1]: Started sysv-test.
nov 21 15:03:23 beryl5 systemd[1]: Starting sysv-test...


Now, when you look at the journalctl, you'll see that before the
ExecStop starts:
* write-sysv-test.pl is killed.
* the fs /oracle/BAS/oraarch a "local-fs" is already unmounted.


The difficulty that we have, is how to have a daemon, no launched by
systemd that can stop nicely by:
 - having its filesystem during the stop of the daemon.
 - able to use a stop script.

Thanks in advance for your help.


[1] scripts_n_console.txt lists the scripts used for the test, and shows
the command done on the console
http://pastebin.com/UWJhrWUD


[2] journalctl -b -1
http://pastebin.com/GKVVbuVg

> Lennart
Cédric BRINER
P.-S. Lennart: sorry for the resent


-- 
Cédric BRINER, Ing. EPFL & HES
+41 (0)22 / 379 71 83
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Spurious failures starting ConnMan with systemd

2016-11-21 Thread Simon McVittie
On Tue, 15 Nov 2016 at 16:02:07 +0100, Daniel Wagner wrote:
> commit 09aa0243aac40ec4e5bd0fbe41e702be4952a382
> Author: Patrik Flykt 
> Date:   Thu Sep 17 10:42:46 2015 +0300
> 
> connman.service: Fix dependencies for early boot
> 
> Unset default dependencies in order to properly run at early boot and
> require the save directory to be mounted before starting.
> 
> See the systemd.unit man page, Debian's wiki page
> https://wiki.debian.org/Teams/pkg-systemd/rcSMigration and the upstream
> systemd-networkd.service file for details.

dbus-daemon is not (currently) designed to be usable as an early-boot
service. You cannot be an early-boot service and depend on D-Bus - you
don't get to "have your cake and eat it".

See also
https://bugs.freedesktop.org/show_bug.cgi?id=98254 and
https://bugs.freedesktop.org/show_bug.cgi?id=89847

Especially these comments:
https://bugs.freedesktop.org/show_bug.cgi?id=98254#c6
https://bugs.freedesktop.org/show_bug.cgi?id=98254#c8

(#c6 explains the significant feature work that would have to happen in
dbus-daemon to make it a viable early-boot service.)

Regards,
S
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel