[sles-beta] systemd sysvinit-compat weirdness

Frederic Crozat fcrozat at suse.com
Fri Sep 25 09:31:18 MDT 2015


Le vendredi 25 septembre 2015 à 14:23 +0000, Aman Nijhawan a écrit :
> I  am seeing lockups on shutdown and reboot in sles12 with my services on sles12 that are using sysvinit-compat.
> It seems systemd is not shutting down services correctly. 
> 
> My solution is to write a custom script  that gets invoked before the shutdown target and before the reboot target and shuts down the service correctly on reboot. 
> But this feels like a hack and also slows the shutdown process down. 
> 
> Is anyone else seeing this? Is there a better solution?

Usually, when people reports this kind of behavior, it is because the
initscript is doing some "ugly" things or is tricking systemd in the way
it is trying to map the initscript to one of the "common" system service
type.

So, my questions would be :
- is your script tries to switch to another user (calling su foobar) to
start a process as a non-root user ?
- is your script tries to spawn a process which might take a long time
before it terminates ?

The best way to debug this would be to boot systemd into debug mode (add
systemd.log_level=debug to your kernel cmdline or use "systemd-analyse
set-log-level debug" to change the debug output for the current
session), then start your initscript, then terminate it (I'm assuming
you have the same issue when stopping it and not only at shutdown).


-- 
Frederic Crozat
Enterprise Desktop Release Manager
SUSE




More information about the sles-beta mailing list