On Tue, Sep 22, 2015 at 02:31:25AM +0200, Lennart Poettering wrote: > Heya! > > Since a long time systemd has been shipping with two-way compat > support for /dev/initctl, and I am tempted to remove it. Before I do > so, I'd like some input on the relevance of this interface: > > a) there's support in systemctl to reboot the system by sending the > right bytes to /dev/initctl as fallback, so that you can reboot a > sysvinit system with "systemctl reboot". > > b) There's a mini-daemon "systemd-initctl.service" that is > fifo-activated on /dev/initctl, and forwards reboot requests from > old sysvinit clients to systemd. > > Both of this was supposed to help transition between sysvinit and > systemd systems: if you mix sysvinit clients with a systemd init > system and vice versa, you can still use the the tools to reboot the > other system. > > I'd claim the interface is borderline useless: the only operation you > can actually readlly properly dispatch with it is rebooting, and > reloading PID1. And that's pretty much it. > > We never even really used this stuff on Fedora properly (since we > actually transitioned from Upstart, not sysvinit, and we never had the > same level of compat for that...). > > This code has been bitrotting for a while, and nobody really cared. > > And most importantly: the entire protocol use by sysvinit via > /dev/initctl is deeply flawed, since it sends messages over > /dev/initctl that are not a divisor of PIPE_SIZE in length. Thus, if > PID 1 didn't read messages quick enough the messages queued could be > half-written and be partially interleaved with another client's > messages, and there is no way the system can ever recover from that. > > Thus, I'd really like to kill this. Does anybody care about it, and > can give me a strong enough reason to keep this anyway?
The libvirt virDomainShutdown|Reboot APIs for triggering controlled shutdown/reboots of guest OS have support for using /dev/initctl with containers, as it was the lowest common denominator that easily worked across systemd, sysvinit & upstart. We could add further code to use a systemd specific interface if needed, so it wouldn't be the end of the world of /dev/initctl was removed, but it'd be nice to not have todo that. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :| _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel