[systemd-devel] RFC: removing initctl support

Lennart Poettering lennart at poettering.net
Mon Sep 21 17:31:25 PDT 2015


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?

(Note that this is not about removing support for any other sysvinit
compat, only really about /dev/initctl. Specifically, support for
commands like "init q" is completely independent of this, and is
supported fine inside of systemctl, and requires no /dev/initctl or
anything).

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list