[systemd-devel] system shutdown: what unit is taking so long?

Jan Engelhardt jengelh at inai.de
Tue Apr 16 22:17:35 PDT 2013


Hi,


I have some hosts with Xen VMs running, and on shutdown, the classic LSB 
script /etc/init.d/xendomains is used to start and stop the "service" on 
openSUSE. There is intricate logic in there to stop/migrate/suspend 
these VMs according to user preferences.

In any case, the shutdown process may take considerably longer than your 
usual signalling-killing of a process.

Under sysvinit, the LSB script would output a status line and update it 
every second to show it was waiting for the VM to complete shutdown.

In systemd, this is no longer the case because LSB output is suppressed 
and written to the journal instead. That in itself would be fine, but 
the problem is that on _system_ shutdown, since any login processes will 
have already be stopped by systemd, there is no way for the admin to 
check what is going on, and the system just practically sits there as 
though it would hang.

I think systemd should print some status message -- like "Shutdown of 
xendomains.service still running" every 5sec, maybe? -- when shutting 
down some service takes longer than expected. If a login shell on 
console was not killed until the really last moment (right before 
umount), that would be even better.


More information about the systemd-devel mailing list