234 points · by possibilistic · 12y ago · 174 comments
If you want a better picture of debian's init decision, the bug got punted to ctte to decide on, so check out the ctte ml archives for December [0] and January [1]. Russ Allbery and Ian Jackson are the most vocal CTTE members on the list and support systemd and upstart respectively. The thread "Bug#727708: init system other points, and conclusion" is where Ian [2] Russ [3] start making the case for their preliminary conclusions.
Edit: If there are other things worth pointing out on the list put 'em here. I've really only been skimming the posts for the last few weeks. They're also considering openRC, but it appears not to be a real contender. Tollef Fog Heen is a debian systemd maintainer and has posts worth reading on both what systemd actually is and what the impact of different decisions.
[0] https://lists.debian.org/debian-ctte/2013/12/ [1] https://lists.debian.org/debian-ctte/2014/01/ [2] https://lists.debian.org/debian-ctte/2013/12/msg00182.html [3] https://lists.debian.org/debian-ctte/2013/12/msg00234.html
One other fun problem Spotify is going to tackle is how we're going to handle systemd vs. upstart if/when we transition from straight-up Debian to Ubuntu.
After two years of upstart I am wholeheartedly regretting ever touching it. It's broken by design and currently in such a bad way that you actually might have to reboot the machine to fix it.
Upstart is the main reason I'm considering dropping ubuntu for something else.
If we stick with Debian, we'll find ourselves back in this situation fairly soon, since Debian's security team only supports oldstable for one year after a new stable is released (approximately — there isn't a set timeline available).
Ubuntu LTS releases, on the other hand, give us predictability and five years of support. That makes me very happy from an infrastructure standpoint. And the more up-to-date packages in Ubuntu repos make our feature devs happier, versus having to maintain backports for modern software.
Positions forming in the Debian init system decision: http://lwn.net/Articles/578208/
You've removed the interesting bit: That it's Spotify's ops people putting in their two cents.
> Spotify responds to "Decide which init system to default to in Debian"
I did mistakenly link to a dynamic resource, though.
ps. please dont be mean, do not upvote this!
It's actually a difficult email to write (especially if you are disagreeing with a proposed change) as it can easily come across as a sort of childish blackmail.
This one seemed reasonably written to me. It was a little light on the technical details of why specifically Spotify finds systemd works best for their use case, but the three bullet points do give some information.
I interpret their "weighing in" on the issue as a balanced and constructive feedback claim to the community, from a community member.
I think it's great when people participate and especially when they go full disclosure; iesaying who they are and from where and especially why (in a positive/constructive way).
with modern service management, a lot of extra "intelligence" has been added to how programs are executed and managed. this leads to levels of complexity and uncertainty that eventually lead administrators to hacking the hell out of the system to be able to use it reliably, usually disabling advanced features so they can control such features themselves.
on top of that, automation of service restart is a solved problem since... decades ago? it's trivial to have a service restart if it's killed. unfortunately, once such a function is added to your init system, people use it all over the place and don't consider the consequences of services restarting automatically. eventually they get bitten by an unforeseen problem and build in limits to the service restart, etc etc. system automation is a lot harder than most people think.
All the more reason to solve it once instead of in a billion different and differently awful addon packages.
Plus, systemd is actually better at this than supervisord, daemontools, etc., already because of its cgroup usage- it can reliably kill all children before restarting, even if the process forks.
Finally, I encourage you to read the systemd docs: http://www.freedesktop.org/software/systemd/man/systemd.serv...
they are quite nice, and show that, in fact, thought has gone into it.
> unfortunately, once such a function is added to your init system, people use it all over the place
I'm not super on board with this view- for almost everyone, if apache goes down, they want something to restart apache because the problem was probably transient and having apache being down is a Big Problem. Plus, most modern supervisors know about things like "restart throttling".
see, this is the problem. people don't seem to understand the paradigm of system automation fully. okay, let's take driving a car automatically as an example.
where are you going? let's assume we know that all the time. now how do we get there? we have to know where we are to figure out how to get there. and on the way, will we need to stop for gas or a bathroom break? once you figure out those things (and a few more) you can get to the meat of the "code", which is how to maneuver the streets without running into anyone. that part is the easy part, because our variables are based on concrete laws of physics, traffic, etc.
the hard part is all those other variables that change based on each trip you take. did we get a flat tire? did someone run into us? is there an unexpected detour? all of these things and more may or may not happen, and you really can't account for them all.
so while it's nice to have intelligent tools, the tools should be designed to make it easy for people to customize their services to their needs, and not attempt to solve all the problems themselves. in my experience, the simpler the tool is, the less assumptions there are.
this leads you to build in things like monitoring, trending, alerting, quotas, resource limits, and generally design your system better to detect, withstand and prevent fault, instead of just reflexively killing and restarting anything when the eventual problems happen.
> Plus, systemd is actually better at this [..] because [..] it can reliably kill all children before restarting
... so that when the state of your database/index/locking/etc goes wacky because some job was killed before it could release the lock, you can then write a lock-cleaner-upper and a post-killing-script-execution add-on to systemd. i'm sure they already thought of that (or encountered it on a running system) so it's probably already a feature, but if not: yikes.
(side note: i did investigate systemd initially and found tons of things they either didn't think of, or hadn't released as features yet. i wouldn't have been able to use systemd as a replacement for my current system without some of them!)
That's exactly the wrong thing for some services, for example sshd.
There's so much confusion over /etc/rc, /etc/init.d, /etc/rc?.d, init(8), inittab(5), initscript(5), what they are and how they are related. Getting the machine setup an in a usable state should be divorced from the services that the machine runs, but this is a fine line. Personally, I consider a machine "usable" if the filesystems are mounted, the machine is network accessible, and a configuration management system starts and/or sshd is running so one can login (and even then, this last one is not a strict requirement). Service management beyond that should be handled as just another process running. It's unfortunate that systemd is being pushed as an init(8) replacement, and doesn't seem to support running as a service itself. This being the default, with the option to replace init(8), would most likely lessen the controversy and reduce risk as systemd is developed and rolled out. "Look, you've been doing process management of individual services with systemd already, and you see the benefits; did you know that systemd can also replace init, to get those benefits system-wide?" It's not presented like that, however.
Any distro which takes them away stops being my friend.
At best, init scripts are 5 lines of actual functionality and 100 lines of boilerplate, and in my experience very few init scripts are at their best. With systemd, the config file contains the 5 lines that actually matter and nothing else. I'd consider the latter to be much more simple, clear, and understandable.
First example where a project maintains both - a particularly verbose service file, compared to an average init file; compare not just line counts, but complexity (variable-filled function calls, branching logic, etc, vs a set of key=value pairs)
https://github.com/varnish/Varnish-Cache/blob/master/redhat/...
https://github.com/varnish/Varnish-Cache/blob/master/redhat/...
Though I'd be glad if someone could explain to me how it does make sense.
(b) is indeed a PITA.
Also, it is all command line at this point, but there are some concepts floating around about creating a gui @ http://mairin.wordpress.com/2011/05/13/ideas-for-a-cgroups-u...
My understanding is that Fedora 20 (which uses systemd 208 ) will be impacted by this, as will most other distros. However jessie is proposing systemd 204, so your method might still work.
I'm quite happy with the mountable filesystem at the moment. It's scriptable and reasonable flexible and still easy to use for solving my problems.
Use systemd: http://0pointer.de/blog/projects/resources.html
Systemd makes these kernel features finally usable.
There is some great documentation @ https://access.redhat.com/site/documentation/en-US/Red_Hat_E...
See http://docker.io
The way that systemd handles it is three-fold:
One, in the .service file, you can put in resource constraints [1] - which will be honored by a service on startup.
The second way is to create a .slice file which is exactly that - a slice in the cgroup hierarchy and where you can assign some resource limits (where it is bound by the slices above it in hierarchy). All services that are assigned to this slice will SHARE that cgroup resource constraints. For your specific requirement, this is the way to go. Create a user.slice (to affect all user accounts) or a user-<some uid>.slice to affect on an individual basis (still will inherit from user.slice).
The third way is to invoke systemctl set-property (with properties defined in [1]) to affect an already running process.
What I am attempting to use is systemd-run [3] to start transient processes (not background services) with resource constraints. However, I have filed an enhancement request on some missing features here [4] . Feel free to star it up !
[1] http://www.freedesktop.org/software/systemd/man/systemd.reso...
[2] http://www.freedesktop.org/software/systemd/man/systemd.slic...
[3] http://www.freedesktop.org/software/systemd/man/systemd-run....
[1] https://github.com/DOMjudge/domjudge/blob/master/judge/rungu...
See also http://manpages.ubuntu.com/manpages/lucid/man5/cgrules.conf....
Fwiw, it looks like those files don't do anything in the default Debian install; you have to install cgroup-bin to pull in the daemons that consult them.
here's some cgroups resource limiting "resources":
http://dustinoprea.com/2013/11/05/better-resource-throttling...
http://www.janoszen.com/2013/02/06/limiting-linux-processes-...
systemd is at least controversial enough in ways that matter to Debian (portability off Linux, etc.) that I think it's nice not to have a monoculture here.
systemd replaces so much overlapping logic, has config files for services rather than scripts, and uses an existing known config format. Basically everything that sucked about SysV init. What's not to like?
Edit: I see you've added portability off Linux. That's a very small concern, and certainly lower than 'deep Linux integration' for most Linux users.
It didn't help systemd's popularity that the people behind it have tried to do disgusting stuff like convince GNOME to make GNOME dependent on it, which doesn't just effect "portability off linux" but the portability of GNOME. (I don't believe they got that one through)
http://blogs.gnome.org/ovitters/2013/10/10/wayland-vs-usrsha...
http://blogs.gnome.org/ovitters/2013/09/25/gnome-and-loginds...
I'm a GNOME release team member. We get really nice contributions from OpenBSD. But 100% of the development is done by people working on Linux. It has been that way since at least 5+ years.
This "portability" complaints is IMO empty talk: actually contribute and make things happen. However, at the moment systemd will share various things across distributions and desktop environments, allowing GNOME developers to not need to maintain as much code as we do (e.g. the freedesktop.org ConsoleKit).
I'm guessing people won't read the blogposts, but oh well :P
logind is basically a much better replacement for Consolekit (which is not actively maintained) and the Gnome devs want to use the other part of systemd (e.g. "systemd --user" ) to manage user sessions rather than write and maintain the code. It makes complete technical sense.
[1] http://phoronix.com/forums/showthread.php?78518-Ubuntu-Plans...
Portability off Linux isn't a small concern for the Debian project as far as I know
Red Hat related distros are very good distros based on systemd and are still available, it isn't necessary for Debian also to adopt systemd in order for people to use and enjoy it
So by using your FreeBSD jail example: Because there aren't any complaints regarding jails, systemd should not be complained about.
After reading this post, I did look at: https://wiki.debian.org/Debate/initsystem/upstart
Which does spell out some reasonable pros and cons of both systems. I'd say the biggest problem with upstart (and possibly the deal breaker) is the licensing terms. Yes, it's open source, but no, I really don't want to have to fill out Canonical's contributer license agreement if I want to contribute. I'm not really sure why Canonical doesn't just GPL like everyone else and leave it at that.
There are some tools out there for upstart, but one thing which would be really nice would be a built in command for visualizing the init graph in ascii. It doesn't have to be fancy, just enough to know where your init script is going to be called in the boot process.
That is about copyright, not about the license. Organizations who requires this includes the FSF and Mozilla for example. See:
Upstart isn't even a real solution for Ubuntu: they still use SysV init scripts for many daemons (I don't know why exactly). Because upstart cannot monitor daemons that it started through init scripts, it's not reliable for process monitoring...
Also see: https://wiki.debian.org/Debate/initsystem/systemd#Upstart
Because they want to be able to have the benefits of proprietary code for themselves (being able to provide their own software under a proprietary license to other parties), without allowing anybody else that same ability.
If it were under the GPL and each contributor retained their copyright over their submission (as is the case with the Linux codebase), this wouldn't be an issue. But by having complete ownership over all the code in the codebase, Canonical is free to change the license at any time they choose.
DISCLAIMER: I'm not a lawyer, everything I say below may be totally wrong.
As far as I know, this is exactly what happens. Canonical's Contributor License Agreements stipulates a form of joint copyright assignment where both Canonical and the author have ownership over the contribution, thereby creating two source trees: one on which Canonical has full control over, the other owned by the collective of individuals who contributed to the project (just like the Linux kernel).
Even RedHat requires you to sign a similar CLA in order to accept contributions for Fedora, 389 Directory Server (LDAP), etc. The FSF does something similar for their project, so does Node, Apache, etc. Canonical's CLA used to be nasty but since they started using the Harmony Agreements I think their terms are reasonable.
Personally, as long as they don't ask me to relinquish all and every right on my contribution and/or ask for unreasonable provisions, I'm fine with a CLA.
OFC small changes or contributions to something like the FSF have to be judged differently, but thats the big picture.
> Even RedHat requires you to sign a similar CLA in order to accept contributions for Fedora, 389 Directory Server (LDAP), etc.
No (with some legacy use of Apache-style CLAs basically confined to some JBoss projects and gradually being dismantled).
I've been Red Hat's open source lawyer since 2008 so I think I can speak authoritatively on this. Red Hat does not use a similar CLA for contributions to Fedora (though at least nominally it used an Apache-style CLA prior to 2010). Since 2010 Fedora account holders agree to the Fedora Project Contributor Agreement (http://fedoraproject.org/wiki/Legal:Fedora_Project_Contribut...) which is a simple agreement that says code is licensed by default under the MIT license (and content under CC BY-SA) unless the contributor indicates otherwise. 389 basically followed the Fedora approach for reasons best understood as historical inertia (by coincidence I noticed last night there is some incorrect information about this on the 389 website).
Red Hat starts up tons of open source projects, and most of them do not require contributor agreements. When I got to Red Hat in 2008 this was already the case, if only because of the nature of Red Hat's culture at the time. But the company was on the verge of applying a uniform (Apache-style) CLA requirement across all Red Hat-maintained projects -- much like so many companies do today. I very soon realized how problematic that would be and I think one of my big accomplishments was not only to stop that from happening but also to reverse it (the trend for that set of projects that used CLAs in the past has been to get rid of them), and to formulate a strong legal-policy basis for doing so, maybe best recorded in my two-part critique of the Harmony contributor agreement suite in 2011: http://opensource.com/law/11/7/trouble-harmony-part-1 .
So please do not use Red Hat as evidence of support for use of broad contributee-friendly contributor agreements. Red Hat has been the leading company, maybe the only company, articulating an alternative viewpoint.
[Edited to fix formatting and to tone down initial scorn slightly] [Edited to acknowledge JBoss situation] [Edited to note Harmony agreements unsuccessful in that few use them]
The most gratifying was the number of people who said they'd give it a try after the talk.
And none of them leverage Linux's features as extensively as systemd. By the Linux init system, I mean the one overwhelmingly supported by most of the Linux community, and the one which is best designed to work with Linux.
Not everyone cares about "linux on the desktop," and not everyone thinks that freedesktop.org is doing the best job as far as that goes either.
Who's talking about desktops? Systemd is not a freedesktop project, and it was designed to make server administration easier by offering much finer grained control and monitoring of system services with a much better interface. Many of its most controversial features -- such as binary log files -- don't make sense except in a server context where the tampering-attestation features of systemd-journald make it a far more secure solution than plain text logs.
You should really read Lennart's essays and blog posts about systemd to get a clearer picture of its tremendous advantages.
Whatever you do, you'd best get used to systemd. It has all but won.
I have read some of Lennart's essays -- but I generally strongly disagree with his conclusions, so I haven't been paying attention for a while. I think his solutions are over complicated and rely on too much impenetrable technology to actually save me any time. The arguments have been made elsewhere, so I won't go into it that deeply, but I think departure from the "unix way" is folly and will only make administration more difficult.
As far as getting used to it goes; this is still unix. I can still install whatever initd I like after the fact. Which I do. Yes, this means I have to do more work than I would have to do if I relied on vendor packages, but we generally use custom packages for all our critical services anyways. Since we're going to have to deal with it whether or not we're using systemd, and we're already rolling out a non-standard initd to our distributions, we don't feel we have to make any investment in learning systemd.
I would vastly prefer if it either made lots of complaints about the ignored lines in inittab, or even if it it failed hard -- because then I would have to fix the problem immediately.
I have used systemd, but never actually poked around at its configuration (having just run Debian with it as a desktop user), so I can't properly judge it yet.
Whether or not the sysadmins want to learn systemd and regardless of whether it's the technically superior super-init system (you can't really call systemd an init system anymore), it's going to be forced down our throats anyway. What's with the holdup?
Dismissing it entirely like you're doing and pretending this is about forcing: good luck with that. Just like distributions were forced to use it right? Not merit, just pushed?
Try coming up with something concrete. Until that the lack of specifics in your posts tells me enough.
I used "unstable" on my desktop for a while, but once every 2-3 years I'd end up with a bug that would break the early boot process, and I'd have to muck around with rescue disks and chroots and reconfiguring grub and the like. So I'd advise against this, unless you want to actually get involved in the Debian project.
Now I run "testing" on my desktop. When packages have been in "unstable" for a certain period of time (typically 10 days, although this is changing) without having a Release Critical (RC) bug filed against them, and if the move won't break any other packages, then "unstable" packages migrate to "testing". It's fairly up-to-date, although sometimes a large group of packages that need to transition all at once will take a while to synchronise.[0] And there are explicit "transitions" for some widely-used base libraries when they undergo ABI changes.[1] But you generally don't need to worry about this, as it'll mostly happen behind the scenes.
Still, if you're going to run "testing", I would still recommend installing apt-listbugs, which will tell you if there are any new RC bugs in any packages you're about to install/update (e.g. that were discovered only after the package migrated to testing), and allow you to decline the update.
Then, every couple of years or so, Debian is "frozen" for a few months, and no new updates are allowed that don't fix RC bugs. Once all the RC bugs have been fixed, and these fixes have all migrated to "testing", that version of "testing" becomes the new "stable". ("unstable" and "testing" can get a bit out-of-date during this time, but generally not too badly). "stable" is then "stable" in that it doesn't change at all, except for security updates, until the next "stable" is released a couple of years later. (There is also "backports" which packages newer releases of some software to go on top of stable, but you can't really rely on anything in particular getting a backport version.) This is handy for large deployments where you need to support users who will freak if their menus move around, or servers, or if you want to create your own distro and need an unchanging base platform to work from.
If you're moderately technical, and want fairly up-to-date shiny, I'd recommend Debian "testing". If you're interested in Free Software in and of itself, I'd definitely recommend it.[2]
[0] https://release.debian.org/migration/ [1] https://release.debian.org/transitions/ [2] http://www.debian.org/social_contract
I currently run Arch on my main computer (and have for the past few years), Ubuntu on a few others, and have dabbled with some other distros for fun. I'm thinking of giving Debian a shot for my main computer, though.
How would you compare unstable and/or testing to Arch (if you have any experience with it)?
There's also something to be said for mindshare. Ubuntu and its PPA system make it easy for people to build packages, and due to Ubuntu's popularity, there are lots of them. AUR does the same. Finding exotic packages for Debian (eg. Steam) can prove difficult.
As the joke goes: unstable means testing, testing means stable and stable means old.
For workstations where I usually want new packages I use unstable. It's not really "unstable" (IIRC Ubuntu is based on it) and has always up to date packages and bug fixes in short time. An unstable installation didn't break for me once in the last 4 years.
The problem with testing is that bugs need too long to get fixed (weeks to months). It's the testing environment for the next stable release so it doesn't really change too often and the packages aren't really the newest versions.
For servers I'm driving stable because I'm rather conservative with servers.
Unstable is all relatively recent but likely to break regularly: it is its job to break so problems are found before packages are moved on.
Testing is less up to date but should be pretty stable. Before each new release Testing is frozen except for changes to fix problems (i.e. new new packages or version updates, except where an update/patch fixes a problem that isn't deemed insignificant for release), once the freeze is complete and the result declared ready the current Testing becomes the new Stable. It used to be that Testing did not necessarily get timely security updates like Stable, so it was strongly recommended against for production and/or public use, though this is no longer the case except for a period after a new release.
"Stable" is just that: it changes as little as possible, updates generally being only to fix security problems or other significant bugs that are found. This means that packages which see a lot of active development can become quite out of date with respect to new/updated features.
It's the price I pay for a stable system. Vagrant for my dev environments makes "stable" a much easier choice.
Recently, I've been looking for an alternative to Debian testing or unstable for the desktop that doesn't stop getting updates during the stable freeze and doesn't break afterwards. It seems like the best option here is one of the rolling release distributions based on unstable like aptosid or siduction; I am downloading an aptosid ISO right now to try it out.
Can anyone here relate their own experiences with those?
Cache: http://bugs.debian.org.nyud.net/cgi-bin/bugreport.cgi?msg=35...
Otherwise, I agree with their endorsement of systemd.
But then again I am an old fuck so..