Fork of Systemd Leads To Lightweight Uselessd
An anonymous reader writes A boycott of systemd and other backlash around systemd's feature-creep has led to the creation of Uselessd, a new init daemon. Uselessd is a fork of systemd 208 that strips away functionality considered irrelevant to an init system like the systemd journal and udev. Uselessd also adds in functionality not accepted in upstream systemd like support for alternative C libraries (namely uClibc and musl) and it's even being ported to BSD.
If it still doesn't adequately support the "kill -1" functionality of initd (which kills and resets all processes init manages, especially the getty processes on the terminals), I still don't want it.
Moderating "-1, Disagree" is simple censorship. Have the guts to post your opinion.
That's how the free open source community works. If you don't like something, it's pointless to just spend a lot of time bitching about it (like many linux users have done about systemd). Just go out and make your own version. Everyone who's been complaining about systemd better contribute to this thing.
All the contenders that didn't 'make the cut*' for the likes of Debian and recent converts to SystemD, namely Upstart and OpenRC... Why reinvent the wheel when the work is already half done?
Either way, I wish the project well. Though the name "Use Less D" or "Useless D" could have been better.
*I still don't see how SystemD is more ready for primetime than anything else (or sheesh, even sysvinit) but we've discussed that here already.
do() || do_not();
Ok, so the ARM is about to be poised to take over lots of systems (cell phones, etc), and you rip out (to save space) a portable embedded tiny clibrary?
In fact the article says that uselessd adds support for compiling it under musl and uClibc
Phoronix take on this is hilarious. A "boycott of systemd" led to the development of uselessd? Rather it looks to me like the uselessd developers saw that systemd had some very good ideas, and they wanted to have that, minus some parts they didn't like, on systems that aren't glibc, and aren't linux. This is part evolution, part competition. Either way it enhances Lenardts' position all along, that traditional script-based system v init is horribly broken. For even uselessd now supports socket activation (systemd's main feature) and process supervision, the latter being sorely lacking from sys v init for many years.
In any event, this is all great news. If anything it paves the way to support modern operating system features on non-linux systems, and non-gnu systems. Part of what's required to finally port modern GUI systems like Gnome 3 to other platforms.
FUD again. The udev module of systemd does not run under PID=1! Please take a look at how systemd is organized before you post something like this.
systemd encompasses many things that used to be separate, but that doesn't mean they all run in the same process. Functionality is still kept modular, and you can update systemd without requiring a reboot most of the time. systemctl --daemon-reexec will reload the updated modules.
I'm not a fan of *ctl commands (hard to type, they don't roll off the fingers), but they are okay.
I thought it would be serious until I visited uselessd' site (http://uselessd.darknedgy.net) and saw such gem: "This has meant eradicating plenty of GNUisms" and GNUisms being a link to... USA's Communist Party (no, seriously: http://www.cpusa.org/).
go and read this first http://0pointer.de/blog/projec..., there is a section on monolithic design
"The hands that help are better far than lips that pray." - Robert Ingersoll (1833-1899)
This project is indeed useless:-)
First it implements the PID1 part of systemd, cutting out things like hostname, date and time management and logind. So this does *not* ship the things that are needed to run Gnome (or soon any other desktop environment). So you need systemd anyway... or a systemd shim or systembsd or whatever to provide the functionality that is missing.
It removes journald... and with it really nice features like systemctl status whatever showing the last bit of output from that unit. That is a huge step back, especially since much of the journald code still needs to stick around: It is the "internal" logging interface used in systemd. It just feeds it on to syslog now instead of writing it to disk, something you could do with one line of configuration.
Removal of udev? You need that functionality, so again you will need to install "real" systemd or some other piece of code replacing that. Again you could just reconfigure the "real" systemd to use any alternative implementation in place of its own.
Then it advertises that it is portable. The developer apparently spend time to make this run on FreeBSD, which is nice, but has anybody in that came ever asked for that? AFAIK they are working on something like Apples launchd. Any other of the BSDs that want systemd? Not that I am aware of.
Then it is portable to other compilers but gcc. Systemd uses gcc extensions that make for more robust code (e.g. destructors for variables). Ripping that out will just lead to more bugs, especially in the error-paths. Not sure that is worth the trouble.
Finally it is portable to other libcs. That is actually somewhat nice... even though glibc is the dominant libc implementation on linux systems (that are not android:-).
Then it removes some really convenient functionality like the timer units. Do we really want to go back to the cryptic crontab syntax? If the job there is somewhat complex it will most likely start a systemd unit anyway (for the security features, resource management, the way better logging or just the better job control). PID1-systemd needs to know the time anyway, and it needs to start jobs, so why not have it start jobs based on the current time? That is definitely less code -- and probably better tested, too -- than running an extra daemon for that rather trivial job.
It also removes the support for the security frameworks... "to stick to a more clearly defined purpose, one that is agnostic of such elements". Wow, that is just plain stupid. If you want to use these frameworks, then you want to have them in use *everywhere*. That is the whole purpose of those frameworks.
Regards, Tobias
Yes. No. Wait - yes. No... no. Uh....
The systemd has modular design.
But monolithic architecture.
Literally everything inside systemd is intertwined using the D-Bus.
So yes, a crash of one of the systemd daemons might cause deadlock/hang or even crash of the rest of the systemd, and consequently affect the processes running under it.
The systemd's design is pretty bad. This is not an exaggeration, when people call it Windows-like: MSWindows OS has very very similar atructure as the systemd. Windows "Event Log" is really cherry topping.
On-topic: uselessd doesn't fix this problem. It lessens it, but doesn't fix it.
All hope abandon ye who enter here.
Regardless of the particulars of this project, it's good people are waking up and realizing what a bloated feature-creeped rube goldberg contraption systemd is, a non-Unix non-Unix-way solution no serious Linux/Unix admin wants, it hinders troubleshooting and configuration. Systemd is what happens when inexperienced people with high IQ fly off on a tagent without engineering ability.
The reason why XFCE was mentioned as a possible default desktop in Debian is the install media size — In order to ship a self-contained distribution that can give you a functional desktop in one CD, GNOME is no longer an option.
But yes, there are several active discussions on how to better achieve this. It's not that Debian has decided XFCE suits us better than GNOME.
(said with a Debian Developer hat on — No, I'm not a desktop guy, nor work in the debian-installer, but do follow the discussions)
systemd is designed to use specific features of the linux kernel. That's why kernel developers as a group aren't up and arms about it. Sure you might get some occasional people like Ted Tso upset, but in general systemd exposes kernel features that a lot of people have worked hard on. Things like cgroups are using copiously in systemd.
... seems to work adequately for the 70+ million OS X installs out there.
I run: Windows, OS X, Linux, FreeBSD. Just because you have a hammer, doesn't mean everything is a nail.
Yet I love XFCE4 and although I run Gentoo as a software developer who needs to freeze various C/C++ libraries in certain versions without crippling my systems update capability, I actually love XCFE4 for it's simplicity and ability to be modified.
I'd rather run XFCE4 and add a bunch of various extra toolbar plugins for a lot of eye candy. Because XFCE4 is lighter weight I don't feel bad having cpu graphs, temp sensors, mem/net/disk indicators, weather, etc all flashing away because it's still less load average than sitting idle on a Gnome3 desktop which oddly needs 6 mouse clicks to get anything to happen.
Gentoo + XFCE4 + OpenRC is how things have been for me and how things will remain.
I have many GCC/GDB versions installed, valgrind, a specific /etc/portage/package.mask which freezes various libraries I code against, yet I can still update my system and stop any changes I do not like. Since the distro is source based it works around these changes unlike a binary distribution where someone else hardcodes their C++ libs into your packages and crosses their fingers you haven't mucked with it.
I clearly used to think Gentoo was a joke in the server world purely due to it's update cycle but honestly I don't think RedHat or anyone else for that matter is really doing it better. I'm starting to think Gentoo with a manual portage overlay on a bunch of servers is what I will switch to next. CentOS isn't cutting it these days and systemd isn't coming to my servers. Not as long as my $$$$ are behind that risk.
But the kernel is monolithic, [...]
Wrong. Linux kernel has modular architecture, but monolithic design. The precise opposite of the systemd.
I know that the uninitiated see the kernel as a big black box. But actually Linux very well structured and highly hierarchical.
systemd can monitor dæmons (only if they use the systemd watchdog facilities) and automatically restart them if they stop talking.
The question here is about the case when systemd itself "stops talking".
Some time ago that would have been theoretical question, but actually there were already such bugs in systemd where it was simply stuck because the daemons which compromise it couldn't understand with each other. This is precisely the consequence of monolithic architecture in combination with modular design: the singular logic is spread across many "modules" (the *-systemd binaries) and when the modules do not agree with each other, things go south pretty quickly.
All hope abandon ye who enter here.
> What can't I do anymore?
Let me see, the top 3 I cannot do anymore include:
- More than half of my companies preferred vendor applications will not run on systemd (some of which will never support it)
- Majority of in-house scripts need to be rewritten
- Kickstart now REQUIRED since they removed "Full Custom Install"
The growing list of complaints are raising flags in my company so much so that we are looking at outright dumping Redhat and we have been a dedicated Redhat Enterprise customer since 1997. RHEL7 has ZERO TCO for everyone I've spoken with... Retraining, retooling, reconfiguring and reorganizing are absurd.
>>So, what alternative are you looking at?
Our vendors who have explicitly stated they will not support systemd in any way (due to +Priv, DoS and bypass issues/concerns) have stated that they recommend either staying with RHEL6 & Oracle Linux 6 until it is no longer supported or switching to AIX or FreeBSD. Two of these vendors are financial software suites, one is a Point of Sale system and the other is a CRM Suite that "may support it in the future". What the other vendors plan on recommending is still TBD for them. Simply put though, many companies are more invested in their applications than any flavor of *NIX.
>>I don't know about how you write scripts, but I find it amazing that a majority of them has to be rewritten.
Have you not seen the number of changes in management, monitoring & configuration commands made within RHEL7? Seriously, it borders on being a completely new distro the way everything has been retooled. Many of our SysAdmin scripts are written in Perl & Bash with remote get for everything from deployment to monitoring and analysis (netstat? gone. ifconfig? redirected. iptables? gone. lsof? switches changed. chkconfig? redirected. So many more...).
That particular blog has been fairly well deconstructed in this thread.
In short, just because the author calls something a myth, doesn't mean it's actually a myth.
"First they came for the slanderers and i said nothing."
it does trump most of the shit pumped out repeatedly - please explain what's irrelevant about his responses to the myths.
"The hands that help are better far than lips that pray." - Robert Ingersoll (1833-1899)
This is just more anti-systemd FUD very light on actual facts.
First you assert that it's somehow a bad thing that systemd uses a standard, established IPC mechanism (D-Bus). Would it have been better if it had invented its own?
Then you claim that a crash of one systemd daemon "might" cause deadlocks/hangs/crashes, but you don't give any example. What daemons are intertwined in such a way that a failure of one would bring down the system? As far as I know, you can kill any systemd daemon (other than PID 1, obviously), and systemd will notice and restart it. Daemons like systemd-journald even use systemd's watchdog mechanism to ensure that they get restarted in case of a hang. In other words, systemd provides a much stronger basis for a reliable system than SysV init.
Fun fact: I just did a "kill -9 -1" to kill every process in a NixOS VM except PID 1. Systemd restarted every system service perfectly. Try that on SysV init.
You missed out some relevant bits in your redaction which illustrates the problem, detractor just cherry pick and take out of context the bits they want to fit their pre-conception. So i think he did a good enough job in his blog post to dispel the myths. Most of that so called deconstruction you linked to is full of personal attacks on him and full of things that are still wrong
....systemd certainly comes with a learning curve.
Myth: systemd is difficult. This also is entire non-sense..."A systemd platform is actually much simpler than traditional Linuxes"
Myth: systemd is a freedesktop.org project. yes, we host our stuff at [freedesktop.org] - "Well, systemd is certainly hosted at fdo, but freedesktop.org is little else but a repository for code and documentation".
Myth: systemd is not UNIX. There's certainly some truth in that. "systemd's sources do not contain a single line of code originating from original UNIX. However, we derive inspiration from UNIX, and thus there's a ton of UNIX in systemd."
Myth: systemd is complex. There's certainly some truth in that. "However, systemd is certainly not more complex than prior implementations of the same components".
Myth: systemd is a feature creep. Well, systemd certainly covers more ground that it used to......"but we carefully make sure to keep most of the features optional. You can turn a lot off at compile time, and even more at runtime. Thus you can choose freely how much feature creeping you want".
"The hands that help are better far than lips that pray." - Robert Ingersoll (1833-1899)
Myth: systemd is complex......rebuttal: systemd is certainly not more complex than prior implementations of the same components".
Do you see how that's not actually a rebuttal? All he's said is, "it's not complex." But the criticisms are that it is more complex. He hasn't said anything to address the criticisms, except that he disagrees with them!
Does it really surprise you that he disagrees? I hope not.
"First they came for the slanderers and i said nothing."
we actually have a mac server, launchd doesn't always launch the 3fd party stuff (like nagios client for example) for whatever reason. I'd take init for it any day of the week
I'm not talking about *init systems* - systemd was never "just an init system". Remember, it's absorbed stuff like network management and system authentication. That kind of feature often requries linking to (L)GPL code, and you can trigger the GPL's requirements depending on how you do that.
So Poettering wants to move all those function calls to (k)dbus. In his own words, "... the primary interfacing between the executed desktop apps and the rest of the system is via IPC (which is why we work on kdbus and teach it all kinds of sand-boxing features)".
Ce n'est pas une signature automatique.
My main problem with systemd is the lack of robustness in its design and implementation. It seems like an attempt at reimplementing Solaris' SMF, but poorly. Even the SMF itself could probably be called 'overengineered', however, it is certainly a more sophisticated, less monolithic design that provides a much higher level of fault-tolerance.
/* FIXME: we need to do something here */
systemd is basically a huge pile of modules compiled into the PID 1 init process. The problem with that is, that if PID 1 dies, the system stops (e.g., kernel panic). On Solaris, a small basic init process starts the SMF master restarter (svc.startd), which is responsible for starting, stopping or restarting the other components of the SMF as well as all services managed by the SMF. If a component of the SMF fails (maybe it just dies/SEGVs, or say, you kill it, cause it hangs), the master restarter will respawn it. Even if the master restarter goes south, that small basic init process will respawn the entire SMF, and you're still up and running.
Then, let's take a look at the implementation of systemd:
static int socket_spawn(Socket *s, ExecCommand *c, pid_t *_pid) {
_cleanup_free_ char **argv = NULL;
...snip...
r = socket_arm_timer(s);
if (r < 0)
goto fail;
...snip... (function call with lots of undocumented arguments, returning r)
if (r < 0)
goto fail;
r = unit_watch_pid(UNIT(s), pid);
if (r < 0)
goto fail;
*_pid = pid;
return 0;
fail: s->timer_event_source = sd_event_source_unref(s->timer_event_source);
return r;
}
Actual code from systemd-216; see full source at src/core/socket.c
Most of the systemd source code looks like this.
Virtually no comments; lots of single-letter variable names, confusingly similar names like "_pid" and "pid"; throwing 'int' return codes back up five calls, where the original caller cannot even remember what all the possible return codes might be (how about enum?); lots of arbitrary goto- and return-jumps out of the middle of somewhere; lots of break and continue, even mixed in the same loop; even substantial amounts of three-star-programming (never heard of it? google it, it's funny); etc.
Okay, I have to add, that the code of lots of the "good, old, reliable UNIX codebase" does not look a lot better (and upstart, or even the Linux kernel, are guilty of at least some of the same bad coding habits). But we have paid the price for writing code that way numerous times, and it seems we did not learn from history.
Coding like that is probably okay if you're writing a nice, little command line utility. But if systemd wants to be THE new init system, it had better look like it had been written by the inventor of reliability engineering.
Right now, the systemd source looks like it violates virtually all of the best practices for writing reliable code. Take a look at what those people who know their craft recommend - e.g., the Federal Aviation Association, European Space Agency, Lockheed Martin's avionics section, etc. - and compare that to systemd's source.
It's like a disaster waiting to happen.
Quite the opposite!
Kill -1 tells a service daemon that is handling hundreds of thousands of simultaneous connections that it needs to re-read its configuration file, without interrupting service even momentarily.
Kiddie stuff doesn't need kill -1. It's only the ultra-reliable stuff in mission-critical roles that needs it.
Suppose you, personally, have a piece of software that controls your artificial heart. Your doctor has discovered that there's a security vulnerability in the silicon, but luckily it can be remediated with a change to the software configuration, so that you don't have to get your chest cracked to fix it. He uploads the new configuration and kill -1's the running software, and it picks up the changes between one beat and the next, never causing you to, you know, die.
OK, maybe that was an unnecessarily dramatic example. A more mundane one would be adding a new web site - you enter the new A, AAA, SPF and MX records, put the new config in the httpd.conf and access.conf files, then you kill -1 the DNS and httpd servers, and none of your other customers have to have their web sites shut down while the new one is being brought up. This happens ten thousand times a day at web service providers all over the world.
It does not matter what Apple does - there is tight controls on the system and code contributed to Darwin might never see life as part of the actual Mac OSX released by Apple.
The init process in Unix and Linux is a very special thing - if it ever crashes, so does the whole machine. It is the first process started by the Kernel after it finishes initializing the system and mounting the root filesystem and is the "parent" of any process that deliberately orphans it's child-processes before exiting itself. It is also in charge of "reaping" any zombie processes. With each addition to its duties the area for an error to happen increases, which increases the risk that the system will just suddenly crash.
This is a problem that people lambasted Microsoft for from the birth of Windows through it's transition to a 32 bit system and still continues to this day for an extent - that they had one piece of the system doing a lot of work and having a wide surface for errors but still critical for everything to work properly. I am loathe to praise Microsoft for anything, but I must praise them for this - they have been moving away from that and I have actually found Windows 7 to be pleasantly stable - to the point of actually being able to recover from the graphics drivers crashing and managing to recover and re-load and re-initialize the system without losing any data. They have turned things around and begun to compartmentalize things to an extremely high degree - lowering the amount of code in each component, raising the ability of their programmers to actively find and fix the bugs during development and lowering the chance that a user will actually hit one of those bugs.
That compartmentalization and modularity (of the userspace, at least) was a hallmark of the design of Unix - each piece did exactly one job and did it well - as well as being as small as possible to reduce the amount of space there was for an error to be in. Yet with this "systemd" we see Lennart Poettering leading the charge to turn that around in order to save some small fraction of time during the boot process. That he created "Pulse Audio" - which appears to have flopped severely and, at least for me, was the cause of a lot of problems (not just for me - I remember finding thousands of people finding that problems were being solved when they got rid of Pulse Audio when I first started having those problems) - seems to be lost on people.
No, one mistake does not make everything someone does wrong, but in this case sacrificing simplicity and modularity so you can "do the boot process faster" is a wonderful idea. Extending the system that does that so it subsumes some of those processes it used to start in parallel for a faster boot time is just idiocy. What's next? Am I going to find that I can send a "draw an ASCII art of a kitchen sink" command to systemd and have it take over the current TTY to do just that?
If systemd was just a system for organizing the boot process, adding some complexity to simplify much more and making sure that daemons providing services get run in parallel to boot the systems boot time... Well, I'd have absolutely no objection to it. Instead it has subsumed separate projects and forced people to fork them or recreate them if they do not want to use systemd. Further, it appears that people that don't like systemd but like Gnome will soon lose the option to run new versions of Gnome because several key components of Gnome now have a hard dependency for systemd or one of it's sub-projects. Open Source is supposed to be about choice and by forcing people to use something that they might not want to that choice is being taken away.
So, with all the sarcasm I can muster, all those systemd supporters out there and it's creator have my hearty applause for doing something that goes against one of the key tenets of the Open Source movement. Bravo! You've successfully taken away something from people that you claim to be supporting. What a show of hypocracy!