Slashdot Mirror


Ask Slashdot: Can You Say Something Nice About Systemd?

ewhac writes: "I'm probably going to deeply deeply regret this, but every time a story appears here mentioning systemd, a 700-comment thread of back-and-forth bickering breaks out which is about as informative as an old Bud Light commercial, and I don't really learn anything new about the subject. My gut reaction to systemd is (currently) a negative one, and it's very easy to find screeds decrying systemd on the net. However, said screeds haven't been enough to prevent its adoption by several distros, which leads me to suspect that maybe there's something worthwhile there that I haven't discovered yet. So I thought it might be instructive to turn the question around and ask the membership about what makes systemd good. However, before you stab at the "Post" button, there are some rules...

Bias Disclosure: I currently dislike systemd because — without diving very deeply into the documentation, mind — it looks and feels like a poorly-described, gigantic mess I know nothing about that seeks to replace other poorly-described, smaller messes which I know a little bit about. So you will be arguing in that environment."

Nice Things About systemd Rules:
  1. Post each new Nice Thing as a new post, not as a reply to another post. This will let visitors skim the base level of comments for things that interest them, rather than have to dive through a fractally expanding tree of comments looking for things to support/oppose. It will also make it easier to follow the next rule:
  2. Avoid duplication; read the entire base-level of comments before adding a new Nice Thing. Someone may already have mentioned your Nice Thing. Add your support/opposition to that Nice Thing there, rather than as a new post.
  3. Only one concrete Nice Thing about systemd per base-level post. Keep the post focused on a single Nice Thing systemd does. If you know of multiple distinct things, write multiple distinct posts.
  4. Describe the Nice Thing in some detail. Don't assume, for example, that merely saying "Supports Linux cgroups" will be immediately persuasive.
  5. Describe how the Nice Thing is better than existing, less controversial solutions. systemd is allegedly better at some things than sysvinit or upstart or inetd. Why? Why is the Nice Thing possible in systemd, and impossible (or extremely difficult) with anything else? (In some cases, the Nice Thing will be a completely new thing that's never existed before; describe why it's good thing.)

We will assume out of the gate that systemd boots your system faster than ${SOMETHING_ELSE}, so no points for bringing that up. Bonus points are awarded for:

  • Personal Experience. "I actually did this," counts for way more than, "The docs claim you can do this."
  • Working Examples. Corollary to the above — if you did a Nice Thing with systemd, consider also posting the code/script/service file you wrote to accomplish it.
  • Links to Supporting Documentation. If you leveraged a Nice Thing, furnish a link to the docs you used that describe the Nice Thing and its usage.

25 of 928 comments (clear)

  1. What Does Systemd Mean to Me? by eldavojohn · · Score: 5, Funny
    "What Does Systemd Mean to Me?"
    By
    eldavojohn

    Systemd has a nice ring to it. The way the syllables roll off my tongue pleases me greatly. It could be the title of a great anime series. It could even be the lost name of an ancient forgotten god-king. It might even be the name I give my first born. It sounds much more authoritative and genuine than sysvinit or upstart or inetd. For instance from my non-technical fourth grade perspective this is what I interpret the others to mean:
    • sysvinit - A cheap knockoff of systemd. Sounds sort of like a sexually transmitted disease phase like syphilis virus initialization.
    • upstart - Sounds like you don't know what the hell is going on. "This young upstart" ... leave it to the pros, greenhorn. Leave it to systemd.
    • inetd - What are we, fishing here? You netted? You netted what? At least tell us what you netted. Is it a record breaking fish? Also, nice try with the cheap 'd' knockoff at the end. Leave it to the originals. Leave it to ... systemd.

    Contrary to your base assumptions, systemd does not actually boot faster on my Pentium II (Intel inside) system. I just like the way it sounds.

    • Personal Experience - I actually stood up at dinner last night and slammed my fist down on the table and yelled at my wife that "WE WILL ONLY USE SYSTEMD IN THIS HOUSE FROM NOW ON" and I flung her iPad against the wall, shattering it. And then I got down on my knees in tears -- having seen the light -- and swore fealty to systemd.
    • Working Examples - Three nights ago I stole away into the night across town to the Olafsen's house (a predominantly Norwegian family) and (being predominantly of Swedish descent myself) spray painted on the front of their new home: "SYSTEMD BOOT HOME" in blood red paint. This was a Nice Thing in a "never forget" sorta way. I then got down on my knees in tears and applied the spray paint liberally to my upper lip -- the same condition in which I write this post for you, dear reader.
    • Links to Supporting Documentation - [1]
    --
    My work here is dung.
    1. Re:What Does Systemd Mean to Me? by therealkevinkretz · · Score: 5, Interesting

      We've had problems a few times with systemd (usually the next boot after an upgrade to a package). Without exception, the failed boot occured with next-to-no meaningful error on the console and was more difficult to debug than if it had been using sysvinit. I personally, as a sysadmin for ~16 years, don't see a problem with sysvinit that justifies tearing it out of Linux for a more complicated, more opaque replacement.

  2. It freakin' works fine by CajunArson · · Score: 5, Insightful

    I've done migrational upgrades to System-d with Arch Linux with zero problems in addition to using it with new installations. It works fine, and I'm still really confused about the jihad-level hatred it seems to engender in some people.

    --
    AntiFA: An abbreviation for Anti First Amendment.
    1. Re:It freakin' works fine by binarylarry · · Score: 5, Insightful

      Remember how awesome pulseaudio is? Well what if we made your ENTIRE SYSTEM that awesome?

      --
      Mod me down, my New Earth Global Warmingist friends!
    2. Re:It freakin' works fine by Anonymous Coward · · Score: 5, Insightful

      Pulseaudio works fine.

      People think it sucks; the reality is that the implementation in Lolbuntu was done poorly, giving the non-competent people a bad taste of it.

      I used it in its first versions, and it handled my 5.1 setup perfectly, switched to headphones when I plugged them. And it had per-application volume working out of the box.

      It's one of the first things I install when I install Debian.

    3. Re:It freakin' works fine by Anonymous Coward · · Score: 5, Interesting

      Are you trying to imply that all the hatred I've heard about pulseaudio was also unjustified?

      Only if you have a setup like Potterings, since he rewrote the pulseaudio configuration to work on his computer and just deleted features he wasn't using to "keep it easy".

      Sort of like how if you're using systemd in an NFS world you're going to have a bad day, since he still hasn't made their dependency resolution work correctly with networked filesystems. Funny that rc dealt with that ages ago by having S01mount S05network S10networkmount but I'm sure there's a very good reason systemd is incapable of using mount -a -t nfs,cifs,smb,afs,etc, I suppose we'll need the kernel rewritten to support a systemd-mount program to solve this problem, which will of course be incompatible with standard mount.

    4. Re:It freakin' works fine by binarylarry · · Score: 5, Funny

      I'm looking forward to the next follow up:

      Ask Slashdot - Can you say something nice about Florian Mueller?

      or no even better:

      Ask Slashdot - Can you say something nice about Slashdot Beta?

      --
      Mod me down, my New Earth Global Warmingist friends!
    5. Re:It freakin' works fine by Anonymous Coward · · Score: 5, Interesting

      Funny that rc dealt with that ages ago by having S01mount S05network S10networkmount but I'm sure there's a very good reason systemd is incapable of using mount -a -t nfs,cifs,smb,afs,etc,

      Really? I confess I haven't looked at how to configure systemd much, but from what I have seen, that sort of setup could be supported easily enough by writing the right unit files (or whatever they're called) and specifying the dependencies.

      Yes, exactly. So, by developing a clear understanding of systemd syntax and dependency specification, you should be able to solve the dependency problem that rc/sysvinit solved fifteen years ago by specifying that dependent processes start after their requirements.

      This is actually a silly example. If all of the start-up processes are loaded sequentially, then order is really not a hard thing to sort out. You can do it manually, in your head, and your brain can process what's going to happen. Systemd introduces a massive complication by allowing init processes to happen in parallel. So, now you've got this horrible optimization to do, where you separate all of the separate init processes into mutually independent sequences that start in parallel. So, your brain can tell that you should start network file systems only after you've started the network, but how about the audio driver? Can you start named in one process while starting apache in another?

      My point is that the dependency issue is really something that systemd introduces, and the benefit of its automatic dependency resolution is only relevant in the context of systemd. If it's really important to you that your computer be able to start multiple daemons in parallel, rather than wait the 5 seconds it takes to start bind before starting apache or samba or whatever, then systemd does that and solves the problems it introduces. If you'd rather understand what happens as your system starts up and not trust someone else's optimization, then systemd is not for you.

  3. Nice Thing: systemctl status shows you log entries by db48x · · Score: 5, Informative

    If you have a service called 'foo', then 'systemctl status foo' not only shows you whether the service is running, it also shows you the last 10 log entries created by that service. This is great when the service failed; usually the error message will be right there.

    How does it do this? Well, because all processes created by the service are in the same cgroup, all of the log messages (and even anything they print to stdout, which would have been lost otherwise) can easily be tagged with the service name (and a bunch of other metadata). You can use journalctl to query the journal for the logs from a specific service, and systemctl status does this for you.

  4. Excellent Tower of Hanoi solver by Anonymous Coward · · Score: 5, Interesting

    Using the information gleaned from this year old bug I was able to create a Tower of Hanoi solver using the dependency resolver's attempts to determine whether a NFS filesystem should be mounted after the network comes up or not. Every attempt to start Apache (which depended on the filesystem) represents moving a disc to the middle tower.

  5. Re:Nice Thing: systemctl status shows you log entr by ledow · · Score: 5, Insightful

    My problem with things like systemd is not that they have nice features - lots of things have nice features. Windows' Shadow Copies is a lovely feature that's a lot easier to configure that some alternative equivalents, etc.

    It's that they put those nice features into some new paradigm of configuration when you could have just added them to the existing system.

  6. systemd needs to stay optional by wierd_w · · Score: 5, Insightful

    'systemd' needs to stay optional, and I mean that explicitly. optional. Not "default", and not "optional, in the sense that you then have to do the maintainer's job for them because they are too lazy to consider people not using systemd, because systemd is the default, and the maintainer does not want to consider the people that dont want systemd, regardless of the reasons or circumstances." kind of way.

    Systemd is potentially useful for only a subset of the linux ecosystem, and forcing this kind of change is a bad thing.

    Please allow me to explain why:

    Systemd seeks to be a "Be all, end all solution to system initialization", which ultimately means that it will itself try to cover every possible thing that its maintainers believe needs to or should happen during system init. That in and of itself means that it will be large and cumbersome; exactly the things that embedded linux should avoid, where ultra-minimalism is king. (We are talking systems that have just a few dozen megabytes of memory, and just a few hundred megahertz of processor power at the most. Having all that gobbled up by the init system as soon as power is applied is not going to win you any trophies, and boldly asserting that embedded devices need to obey a desktop paradigm is throwing the baby out with the bathwater.)

    This is especially true with "reference distributions", like debian. Debian "console only" deployments with tools like debootstrap are reasonably common with embedded devices, as are deployments that make use of chroots for specific sandboxed services. A chroot does not need a full blown init like systemd. It is best served with a simple init script. Building a distro with the intention of killing simple init, and replacing it with a monolithic solution like systemd will make service daemons much more difficult to control in this way, and will actually rob core functionality away from the distro that goes that route--- exclusively in favor of desktop flavored deployments.

    Linux is more than desktops.

    Linux is routers.
    Linux is home automation systems.
    Linux is servers performing specialized functions.
    Linux is so much more.

    Please be more considerate about trying to force systemd into debian. Optional is OK. Optional like "gnome vs kde vs xfce vs $ManagerHere". Not "optional" like "unity on ubuntu". Debian is a reference distro, upon which many other distros are based. It has already found its niche in the linux ecosystem. Please dont try to reinvent it.

  7. Read of the better systemd commentaries around by Anonymous Coward · · Score: 5, Informative

    http://uselessd.darknedgy.net/ProSystemdAntiSystemd/

    This comes from an "anti-systemd" source, but tries to cut through a lot of the controversy and hostility shown on both sides. Bear in mind, you only see the anti-systemd view on Slashdot, but you get just as much idiocy on the other side as well. For example, the Poettering "death threats" were actually a joke made by a bunch of people in an IRC channel. Here, read the log (ctrl-F "hitman"):
    http://logs.nslu2-linux.org/livelogs/maemo/maemo.20130215.txt

  8. Plays nicely inside a container by Rich0 · · Score: 5, Informative

    I've been starting to migrate many of my services at home to containers to make them a bit easier to maintain (a bit of a tangent - having 5 containers instead of one host with 5 services means that you have to do 5x as many updates, but each update can at most break one thing at a time). This was trivial to do with systemd-nspawn.

    With a command line that barely fills a terminal line I can launch a container, have it boot systemd inside the container, have a few bind mounts, and have it get its own IP like a lightweight VM. Within the container systemd just does whatever it is told to do, like launch ssh so that I can get in, configure the network, and launch whatever services the container was intended to provide. The container journal logs are symlinked back to the host log directory, so they're really easy to look at from the host.

    Sure, you can do similar things with docker, but doing it with systemd involves less tooling in general.

    Also, for simpler situations systemd-nspawn makes a VERY good substitute for chroot. In addition to doing everything chroot does, it starts a separate process namespace so you don't see outside processes from inside the container. It also automatically sets up /dev for you, sets up resolv.conf, etc - it can do all this while just spawning one program inside just like chroot does (so no need to run systemd inside). It can also set up bind mounts if you ask it to. When you exit it cleans up - no lingering bind mounts, or tmpfs, or /proc and such inside. Also, any mounts inside the container aren't visible outside, so you can run a backup on your chroot and not have it follow bind mounts, or try to save /proc/kcore or whatever. In fact, you could spawn 5 containers inside the same directory and they can have private /tmp and /dev and /proc while seeing changes each other make in the files in the actual chroot.

  9. Re:Out-of-the-box babysitting of processes by Deagol · · Score: 5, Insightful

    Maybe I'm unique in this regard, but as an admin, if something goes down on one of my servers, I want it to stay down until I intervene.

    Firstly, if I'm properly monitoring the process, then I'll be alerted and can investigate.

    Secondly, there may a *reason* the process goes down, and having it down may be a good thing. If someone's trying to fuzz our httpd process for exploitation, then it happily restarting will open up a wider attack window.

    Autopilots on production servers seem like a bad idea to me.

  10. Stop means STOP by Rich0 · · Score: 5, Informative

    One thing I really like about systemd is that when you stop a service, it actually stops.

    I used to run monit with openrc and when you wanted to restart a service you had to play games to ensure that it was really killed, and that the service state was cleaned up, and so on. Just telling openrc to stop the service just wasn't reliable at all - it worked well when nothing was wrong, but if nothing was wrong chances are monit wouldn't be doing anything.

    Systemd is very effective at containing processes and their children and when you stop them, they are all gone for good. If you want to restart a service, systemctl restart service will get the job done 100% of the time, assuming the configuration/etc lets it restart. It does support graceful shutdown of individual services, followed by process genocide.

    This also applies to things like cron jobs you launch through it. When the parent process ends, anything left gets cleaned up.

  11. Hardening by icemaze · · Score: 5, Informative

    Systemd was forced down my throat by Arch Linux. I didn't know anything about the controversy back then, so I just thought: "There's probably a good reason for this, let's get to work".

    I read some docs and I liked the security features a lot! You can tighten services easily with a declarative syntax.

    Here's a snippet from my ntpdate.service file. You don't need much systemd knowledge to guess at what each line does:

    PrivateTmp=true
    ReadOnlyDirectories=/
    InaccessibleDirectories=/boot
    InaccessibleDirectories=/root
    InaccessibleDirectories=/etc/ssh
    LimitNPROC=1
    DeviceAllow=/dev/null rw
    DeviceAllow=/dev/urandom r
    User=nobody
    Group=nobody
    CapabilityBoundingSet=CAP_SYS_TIME
    NoNewPrivileges=true

    I ended up enjoying that work and tightened things so much that I hit a bug, which was resolved in just a few days: https://bugs.freedesktop.org/s...

    But I still don't know how to configure the network properly T_T

  12. Re:Sure. by stooo · · Score: 5, Funny

    Or even better : The nice thing is systemD is not portable. It will infect only linux.

    --
    aaaaaaa
  13. Exit codes matter by Rich0 · · Score: 5, Informative

    A small thing I've come to appreciate with systemd is that it actually cares about exit codes. This applies to any unit, including timer units (the equivalent of cron jobs). I ported most of my cron scripts over to systemd and suddenly started noticing scripts which had been having non-zero exits for ages, but fcron just didn't care about exit codes.

    You can tell systemd to ignore exit codes for a process, or specific exit codes. However, I've found that in general using systemd I have a lot more awareness of abnormalities in my services.

    Sure, you can often get away with ignoring exit codes, just as you can often get away with ignoring compiler warnings. However, in getting rid of them I fixed a few problems ranging from trivial to important, and my system is more robust for it.

  14. Re:Thanks for making my point by swillden · · Score: 5, Insightful

    In which case a nanny process restart is useless. Thanks for making my point, idiot.

    Many hardware failures are transient, and a process restart is a very effective fix, at least in the short term. In the longer term, you'd better have monitoring in place so you know that the restarts are happening and can decide when to fix the hardware.

    In addition, many process crashes are caused not by hardware failures, but by obscure software defects, and a process restart is not only effective at getting the production system back online, but arguably is a complete solution to the problem if the defect is sufficiently obscure that it's very rarely triggered, and hence not worth the large amount of effort required to identify and fix it.

    --
    Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
  15. Re:Out-of-the-box babysitting of processes by thegarbz · · Score: 5, Insightful

    Maybe I'm unique in this regard, but as an admin, if something goes down on one of my servers, I want it to stay down until I intervene.

    I have the opposite view. If something goes down:
    1) I want to know about it. I want some monitoring system to send me an alert of some description.
    2) I want it set up in a way that it won't clobber it's own log files. Preservation of the reason something failed is key.
    3) I want it to automatically restart if possible. I say if possible because I want to avoid a re-start loop but if something goes down and comes back up then the end user is happy as uptime is maximised and providing criteria 1 and 2 are met I'm no worse off as an admin. Believe it or not random crashes may sometimes happen and may have nothing to do with the config or the system itself. I may be caused by some edge case that was hit by a user, and in those cases I am unlikely to find the problem quickly and in the interest of not limiting user access would be inclined to get the system up and running as quickly as possible and then sort through the log history into what the actual problem was afterwards anyway.

  16. Re:What system d really is by olau · · Score: 5, Insightful

    The reality is that before systemd showed up, there wasn't really any project with an active upstream that tried to solve the plumbing problem (I'm not talking about init in isolation here). Each distro had to invent their own hacks, some of them good, some of them not.

    The fact is that the community that is beginning to form around systemd is much more healthy than the scattered bits and not-quite-fitting pieces we had before. Maybe that's sad, I don't know. I think that in the end, the unification around systemd will allow competitors to form (just implement the interesting subset of the systemd interface and you can integrate with all distros!). So long term we'll end up with a much more vibrant plumbing for Linux.

  17. Re:Thanks for making my point by olau · · Score: 5, Interesting

    In which case a nanny process restart is useless. Thanks for making my point, idiot.

    Your logic is flawed. Random bit flips sometimes happen. They don't necessarily take down the whole machine.

  18. Why dislike something you know nothing about? by backtick · · Score: 5, Informative

    Background: I've professionally administered Unix and Linux machines for >25 years, including various BSDs, Linuxes, Irix, HP-UX, Solaris/SunOS, AIX, etc. I've been certified by several vendors or distributions, including, since 1999, Red Hat (which gives me quite a bit of background on their specific implementations over the years). I don't work for a company doing development of any OS or platform. heck, other than random 401K type aggregate ownership, I don't own stock in any company that cares about this issue at a deep level, to the best of my knowledge :)

    Personal Bias about this thread: You pretty much lose all the credibility possible with me when you start of with "I ... dislike systemd because ... it looks ... like a poorly-described, gigantic mess I know nothing about ... ." (It's the "disliking something you know nothing about" that bugs me). Otherwise, I don't care much about this debate on a personal level. I currently admin boxes using systemd as well as everything else, and nothing about systemd has caused me anywhere near the heartache that it seems people who haven't used it much seem to feel about it.

    Seriously, there're thousands of pages of documentation about what it is, how it works, and what most if not all of the design basis decisions are/were. I'll link you to a few of them because hey, you can get to slashdot and post, but you can't seem to use Google ;) (tongue in cheeck, of course). There're plenty of folks who DO have great detailed reasons on why they don't like bits and pieces of it, and you should be able to compare them to the various info I'm linking below.

    Systemd has tons of upside and tons of downside. Most are pretty well detailed, although many of the gut reactions people seem to have to it are based on a lack of understanding about how it works and what it's compatible with, to wit "I can't use shell scripts for anything at startup anymore!" , "All of my old chkconfig or SysV scripts can't be included at all!", "It kills off syslog!", "The only reason it exists is to make laptops boot faster and in the server world we don't care", etc. Those are easily researched and the actual basis (or lack thereof) pretty easily found.

    So, for why the systemd setup looks like it does, you can go back 4.5 years to where the announcement and rationale is described. Speed is part of it, as is device changability, as is double-forking, resource limits, and service state checking and recovery. Yes, it's a load of stuff. Definitely a system-wide approach VS a semi-random collection of various ways to do things all tacked together (which is, frankly, what most Unix and Unixlike systems are, through survival of the fittest).

    http://0pointer.de/blog/projec...
    http://0pointer.de/blog/projec...
    http://0pointer.de/blog/projec...
    http://0pointer.de/blog/projec...
    http://0pointer.de/blog/projec...

    Since RedHat's obviously the largest major proponent and arguably the source of the most production users, here's their documentation:

    https://access.redhat.com/docu...

    Here's the project page with loads of links about the software and uses cases:

    http://www.freedesktop.org/wik...

    And of course so many questions have been raised the developers have posted their rebuttals to myths or misunderstandings.

    http:/

  19. Journalctl logging is more secure (bug #1098132) by Anonymous Coward · · Score: 5, Informative

    Caveat: I am a server admin.

    With systemd, one can't even remotely log a journal natively, which is par for the course in many server environments. You can't make this stuff up, please see bug #1098132 (https://bugzilla.redhat.com/show_bug.cgi?id=1098132) At the time I'm writing this, that functionality still just *doesn't exist* in systemd/journalctl. It was almost pushed into the last revision, but the bugs were show-stoppers so was pulled. Even if it does go into the next systemd revision, how long until it's really kosher for solid/production environments? 1 year? Two? Three? Yet it's being pushed as the default *now*.

    To explain why this is important: if someone cracks in, the log files are going to be one of the first things they muck with. You have locked down syslog/et al, so you can tell if they muck with the binaries, but the log files themselves are considered compromised. Logging remotely at the same time before the data even hits the disk creates another layer of safety, which you simply can't do with systemd/journalctl. One day you will, assuming you want the binary journal and journalctl, but even if you wanted those now you couldn't. Yes, you could rsync over a copy of the files, but there's a reason why people aren't just doing that for regular logs and this is going long.

    Over the last decades, people have worked out tried-and-true systems for documenting and verifying logging. So from an audit perspective, with journalctl you can't lock down syslog-ng and that process, because you've introduced an untrustworthy one above it. They know the current strengths and limitations -- to the point that there are legal/liability issues involved for many if their logging goes wonky. Journalctl adds a layer between the systems they have that work (and even have protocols in place for in terms of auditing), and as of right now adds a *wonky* layer that's very buggy. And by buggy I mean prone to corruption and simply not doing as its told.

    Here's the real kicker: most of this issue would go away if systemd was willing to allow the user to not use journalctl and let things like syslog-ng have that data in the raw. It is choosing not to allow that as a tactic, as opposed to what the users and tech itself wants, and so here we are.

    Also, this entire proposition by samzenpus is inane. When one thinks backwards from what the motivations might be, none of them are good and make me lose that much more respect for the site.