Live data from Hacker News

Busybox removes support for systemd

git.busybox.net

191–200 of 203 posts

Re: Busybox removes support for systemd

#191
post #152

Earlier quoted context omitted.

> The technical aspect here is completely insignificant. I disagree. My initial reaction was to lament the fact that BusyBox syslogd has lost the ability to be passed its socket as an open file descriptor. One may debate whether systemd's mechanism or UCSPI-UNIX (extended to datagram sockets) is the better way to pass such descriptors along. But it now has no mechanism. BusyBox syslogd is now less than it was.

Honestly, the people who use Busybox are probably aware of the problems - political as well as technical - with systemd, and most likely not using systemd in the first place because it's not exactly a good choice for embedded systems. Also, for busybox syslogd, it does not matter at all whether you can hold its socket. syslog isn't a reliable mechanism anyway, and busybox is light enough that the non-ready period is…

You've got socket-holding on the brain. (-:

The significant technical aspect is, as I mentioned, that now there's no mechanism to pass an already-open socket to the daemon. nosh has several service bundles supplied out of the box for providing syslog service. They provide the various combinations of two different syslog tools over /run/log, UDP port 514, and /run/systemd/journal/syslog. Each operates in the UCSPI(-like) way, opening the datagram socket specific to the service being run, dropping privileges (in the syslog-read case), and then invoking the daemon program. All sorts of fairly obvious (to those familiar with the daemontools way of doing things) consequences ensue, like separated streams for local clients and remote clients, and control of whether and whose remote client service is provided that is as straightforward as taking the individual services up and down.

Rainer Gerhards rsyslogd and the nosh toolset's own syslog-read both support this. The BusyBox syslogd used to be usable in this way, as well. udp-socket-listen and local-datagram-socket-listen have a --systemd-compatibility option that would have interoperated quite happily with the BusyBox code as it was.

But thanks to BusyBox syslogd now being less than it was before, the systemd compatibility won't work and there's no mechanism for this in BusyBox syslogd. In taking a sideswipe at systemd people, Denys Vlasenko has made BusyBox less operable with other systems that are not systemd. That's a shame, in my view.

Re: Busybox removes support for systemd

#192

Earlier quoted context omitted.

Perhaps. Observed a lovely exchange a while back where a database was being publicly shamed for producing a poor unit file (i think they actually had the unit file launch a shell script that fired up the database). Their response given was that it was the only way for them to avoid tying their database to the systemd signaling lib. This was counted by one of the systemd devs claiming they could just use a socket that…

Right, you're supposed to use the published interfaces. There's nothing particularly novel about that -- neither Microsoft nor Apple will support you if you don't use their public APIs, and in fact Apple will refuse to publish your software in their app store if you don't. With respect to socket activation, a pretty useful tutorial, published by the systemd author, can be found here: http://0pointer.de/blog/projects/…

> Right, you're supposed to use the published interfaces.

You missed the point. I'll isolate each component for you:

"[A] database was being publicly shamed for producing a ... unit file ... [that used] a shell script [to start] the database[.]"

"[The database devs mentioned] that it was the only way for them to avoid tying their database to the systemd signaling lib."

"[O]ne of the systemd devs [mentioned] they could just use a socket that systemd provides."

"[But this] ... 'option' ... was presented [at the bottom of the man page for the systemd signalling lib that the database authors were trying to not use] as a note on the internal workings of systemd."

"[You] will find warning after warning about not using systemd internals, as the devs reserve the right to change the behavior of those internals at any time."

So, this "option" -as documented- is something that you cannot rely on, as it is subject to change at any time, without warning.

> With respect to socket activation, a pretty useful tutorial...

Tutorials are no substitute for documentation. Documentation describes the contracts that the software commits to. Tutorials can exploit edge cases and undocumented behaviors without warning. Moreover, if the docs say that the tutorial is demonstrating a feature that's subject to change at any time, you'd have to be a madman to rely on it.

> The DBus API can be found here...

If the database devs don't want to depend on the systemd signalling lib, I bet they really don't want to depend on DBus. This might come as a surprise to some, but many servers don't run a DBus daemon.

Re: Busybox removes support for systemd

#193

Earlier quoted context omitted.

In order to see the quality difference, you have to compare the docs to another project that you make extensive use of. I know that Postgresql's and Erlang's documentation is really rather good. So, go use Postgresql or Erlang for a slightly non-trivial project, then -now that you know about the topic that the docs cover- compare the quality of the systemd documentation to the documentation of either other project. P…

True, systemd's documentation isn't very bad though, it's reasonable (lack of internal documentation is pretty common in many open source projects).

Remember that this thread was sparked by otterly's comment: [0]

> The documentation for systemd and its utilities is second to none.

What little I've seen of systemd's user/sysadmin documentation leads me to believe that it is okay. I also understand that documentation is often the least interesting part of any project, and often sorely neglected.

However. Everyone I've heard of that tests out the Systemd Cabal's claim that

"Systemd is not monolithic! Systemd is fully documented and modular, so any sufficiently skilled programmer can replace any and all parts of it with their own implementation."

by attempting to make a compatible reimplementation has failed at their task [1] and reported that the internals documentation is woefully insufficient.

When you're writing software for general consumption, good user documentation is a requirement. After all, if noone can figure out how to use your system, "noone" will use it.

When you also claim that you go out of your way to provide enough documentation to allow others to understand the relevant parts of your internals, and be able to write compatible, independent implementations of your software, the quality of the documentation about your internals is now in scope for evaluation and criticism.

[0] https://news.ycombinator.com/item?id=10485095

[1] I am very aware that this task is made harder by the fact that it is large and thankless. :)

Re: Busybox removes support for systemd

#194

Earlier quoted context omitted.

Right, you're supposed to use the published interfaces. There's nothing particularly novel about that -- neither Microsoft nor Apple will support you if you don't use their public APIs, and in fact Apple will refuse to publish your software in their app store if you don't. With respect to socket activation, a pretty useful tutorial, published by the systemd author, can be found here: http://0pointer.de/blog/projects/…

> Right, you're supposed to use the published interfaces. You missed the point. I'll isolate each component for you: "[A] database was being publicly shamed for producing a ... unit file ... [that used] a shell script [to start] the database[.]" "[The database devs mentioned] that it was the only way for them to avoid tying their database to the systemd signaling lib." "[O]ne of the systemd devs [mentioned] they coul…

Directly talking to the notify socket is not considered using systemd internals. It is documented as a stable, public interface:

https://wiki.freedesktop.org/www/Software/systemd/InterfaceS...

Socket activation doesn't have any systemd-based interface. You just get a file descriptor passed in the normal Unix way. The systemd library functions related to socket activation are utility functions for examining the inherited socket, but they are just wrappers for any other way you might do so.

You can configure daemons like nginx or PHP-FPM to use sockets inherited from systemd instead of their own, and it works fine. They don't have any specific support for systemd socket activation, nor do they need to. They can't even tell the difference between the systemd sockets and ones they'd get on a configuration reload.

Re: Busybox removes support for systemd

#195

Earlier quoted context omitted.

Remember that vezzy-fnord was responding to a comment that made the following erroneous statement: > systemd is NOT making the change to manage cgroups from PID1. Kernel is... I've heard systemd proponents assert that both udev and the cgroup manager must live in either kernel space or in PID 1, because to do otherwise would expose systemd to races or something while PID 1 started udev and/or the cgroup manager. Thes…

you are correct - I had conflated the PID1 argument with cgroup daemon, because as far as I stand.. it doesnt make a difference to me. There have been alternative managers like cgmanager [1] that lxc is bringing - which (surprisingly) work well with systemd as well [2] . Probably another reason not be scared of systemd ;) [1] https://linuxcontainers.org/cgmanager/introduction/ [2] http://unix.stackexchange.com/questi…

> There have been alternative managers like cgmanager [1] that lxc is bringing - which (surprisingly) work well with systemd as well...

Given that vezzy-fnord told you: [0]

> The kernel mandates a single [cgroup] writer.

you must have come to the understanding that the way cgmanager gets its work done on a systemd system is to pass control group management requests through to systemd's control group manager. Because the ultimate plan is to have a single CG manager, either cgmanager, or systemd's control group manager handles the CG management requests. There's no other way it can work. Because the systemd project is heavily vertically integrated, the odds that cgmanager uses its own CG manager are near-zero.

> you are correct - I had conflated the PID1 argument ... because as far as I stand.. it doesnt make a difference to me.

Yep. Your arguments and assertions have been almost exclusively soft and non-technical. Here's some advice: When people are making comments about technical topics, don't join in the conversation unless your level of understanding on the topic is just about as deep as that of those who are speaking. [1]

> Probably another reason not be scared of systemd ;)

Given the timestamp on this comment, it seems unlikely that you've not had the opportunity to read my reply [2] to one of your much earlier comments. Given that I lay out five solid non-fear-based arguments for why one might be worried about the systemd project, your assertion that I shouldn't be "scared of systemd" is extremely dismissive.

[0] https://news.ycombinator.com/item?id=10486471

[1] Unless -of course- you're joining the conversation to learn more about the topic. In that case, refrain from making uninformed assertions, ask clarifying questions about things you are unsure about, and make the limits of your knowledge clear up front.

[2] https://news.ycombinator.com/item?id=10488921

Re: Busybox removes support for systemd

#196
post #152

Earlier quoted context omitted.

> The technical aspect here is completely insignificant. I disagree. My initial reaction was to lament the fact that BusyBox syslogd has lost the ability to be passed its socket as an open file descriptor. One may debate whether systemd's mechanism or UCSPI-UNIX (extended to datagram sockets) is the better way to pass such descriptors along. But it now has no mechanism. BusyBox syslogd is now less than it was.

Honestly, the people who use Busybox are probably aware of the problems - political as well as technical - with systemd, and most likely not using systemd in the first place because it's not exactly a good choice for embedded systems. Also, for busybox syslogd, it does not matter at all whether you can hold its socket. syslog isn't a reliable mechanism anyway, and busybox is light enough that the non-ready period is…

> it's not exactly a good choice for embedded systems.

I don't develop embedded systems, but systemd is actually popular in that space because of its watchdog capabilities and its inclusion in projects like GenIVI and Tizen.

More detail is in this post from an embedded systems developer here: http://www.phoronix.com/forums/forum/phoronix/latest-phoroni...

Re: Busybox removes support for systemd

#197

Earlier quoted context omitted.

> Right, you're supposed to use the published interfaces. You missed the point. I'll isolate each component for you: "[A] database was being publicly shamed for producing a ... unit file ... [that used] a shell script [to start] the database[.]" "[The database devs mentioned] that it was the only way for them to avoid tying their database to the systemd signaling lib." "[O]ne of the systemd devs [mentioned] they coul…

Directly talking to the notify socket is not considered using systemd internals. It is documented as a stable, public interface: https://wiki.freedesktop.org/www/Software/systemd/InterfaceS... Socket activation doesn't have any systemd-based interface. You just get a file descriptor passed in the normal Unix way. The systemd library functions related to socket activation are utility functions for examining the inheri…

> Directly talking to the notify socket is not considered using systemd internals.

Then -according to digi_owl's report- it sounds like the documentation for the signalling lib should be fixed.

Re: Busybox removes support for systemd

#198

Earlier quoted context omitted.

Directly talking to the notify socket is not considered using systemd internals. It is documented as a stable, public interface: https://wiki.freedesktop.org/www/Software/systemd/InterfaceS... Socket activation doesn't have any systemd-based interface. You just get a file descriptor passed in the normal Unix way. The systemd library functions related to socket activation are utility functions for examining the inheri…

> Directly talking to the notify socket is not considered using systemd internals. Then -according to digi_owl's report- it sounds like the documentation for the signalling lib should be fixed.

The closest I could find in the docs to what digi_owl said is the following:

> Internally, these functions send a single datagram with the state string as payload to the AF_UNIX socket referenced in the $NOTIFY_SOCKET environment variable. If the first character of $NOTIFY_SOCKET is "@", the string is understood as Linux abstract namespace socket. The datagram is accompanied by the process credentials of the sending service, using SCM_CREDENTIALS.

I can see how someone would be reluctant to rely on that, even given the interface promise and the nudging of the systemd developers. To be more consistent with what's a stable, public interface and the admonition to avoid internals, I would probably drop the word "internally."

Indeed, I've created a pull request: https://github.com/systemd/systemd/pull/1759

Re: Busybox removes support for systemd

#199

Earlier quoted context omitted.

It only replaces sysvrc, [0] but I find the OpenRC-powered systems I admin to be quite sane and easy to manage. [0] But that's okay. I strongly suspect that when most folks say "sysvinit", they really mean "sysvrc". Hell, I used to be one of those folks until a while back.

I am worried even more that people people may well have used upstart for a number of years and still think they are using sysv, because upstart could grok the scripts without change. But then i am sitting here using a distro that boot by way of a couple of flat files. Frankly i kinda like it, but then i grew up fiddling with autoexec.bat...

> because upstart could grok the scripts without change

I don't believe that's the case. The "service" command (which is part of the sysvinit-utils package, not Upstart) invokes either Upstart or SysV init as necessary, but Upstart itself has no awareness of the SysV init world. You couldn't have an Upstart service depend on a SysV init one, list SysV service status with Upstart, or enable a SysV service through Upstart.

In case you're curious, the wrapping on the systemd side is more comprehensive. SysV scripts appear as units, and systemd parsed the semi-standard metadata at the top of most SysV init files to determine when the service should start if enabled (translating from the traditional run levels). As units, the SysV init scripts are possible to enable/disable, start/stop, and list using the standard systemd commands. They can also participate in dependency graphs alongside systemd units.

Re: Busybox removes support for systemd

#200

Earlier quoted context omitted.

> Directly talking to the notify socket is not considered using systemd internals. Then -according to digi_owl's report- it sounds like the documentation for the signalling lib should be fixed.

The closest I could find in the docs to what digi_owl said is the following: > Internally, these functions send a single datagram with the state string as payload to the AF_UNIX socket referenced in the $NOTIFY_SOCKET environment variable. If the first character of $NOTIFY_SOCKET is "@", the string is understood as Linux abstract namespace socket. The datagram is accompanied by the process credentials of the sending…

Props for fixing the documentation. :D

However, even with your change, I still read that section as describing implementation detail that's not guaranteed to be stable. If that note describes a stable, documented protocol, a link back to the documentation of that protocol would be helpful and reassuring.

Post reply on HN