Is it possible to query systemd target?
stefan.bader at canonical.com
Thu Jan 14 09:09:24 UTC 2016
On 13.01.2016 18:50, Steve Langasek wrote:
> On Wed, Jan 13, 2016 at 06:06:01PM +0100, Stefan Bader wrote:
>>>> Right now (at least Wily+Xenial) there is a non fatal but annoying problem with
>>>> Xen. On shutdown/reboot systemd tries to unmount several file systems. One of
>>>> which is /proc/xen. Right now Xen still uses /etc/init.d/xen for start/stop. The
>>>> same script is also called via invoke-rc.d from *.prerm/*.postinst (which might
>>>> be another place to modernize at some point). And because of that there is one
>>>> daemon (xenstored) that must be kept running on stop (otherwise state info on
>>>> guests running during the upgrade is lost).
>>> I'm a bit lost here -- what does the xen init.d script have to do with
>>> cleaning up mounts during shutdown? When you say "systemd tries to
>>> unmount several file systems", that's happening very late after every
>>> service has stopped and it basically does the equivalent of "umount -a",
>>> right? (This is "umount.target", see man systemd.special.)
>> Right so something (likely the umount.target) does the umount late on
>> shutdown after all services stopped. xen currently is not a service but
>> sysV script. It was called but does not stop that one daemon (because the
>> same script is called on pkg upgrade). And because the daemon keeps the
>> mount busy umount -a fails.
> This sounds to me like a correct solution is to split your init script into
> multiple scripts, and use the correct dh_installinit options for each in
> debian/rules (i.e., dh_installinit --no-restart-on-upgrade).
Indeed this sounds like a good idea. At minimum split the current "xen" into
"xenstore(d)" and "xen". So the former is not restarted on upgrade and the
latter will be. Might be something that even Debian could "like".
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 836 bytes
Desc: OpenPGP digital signature
More information about the ubuntu-devel