Two months ago, I polled the community for advice on the underlying operating system that should power SoylentNews (SN). After reading comments, and some recent experiences in my personal and professional life, we are migrating to Gentoo as the operating system of choice. As of right now, we've already migrated our development box, lithium, over, and using it as a shakedown to see how painful the overall migration will be. I'm pleased to report that, aside from varnish (an HTTP accelerator), the process went relatively smoothly.
For those who weren't here for the original article querying the community (linked above), let me recap the situation. At the time that I wrote that article, SN was mostly standardized on Ubuntu 14.04, with a single CentOS 6.7 box lurking in our midst. In the course of testing updates and other projects, the staff and myself felt that Ubuntu (and Debian) had lost a lot of the advantages that had made it a rock solid choice for the last three years of powering SN, combined with the fact that the upgrade process would not have been trivial due to the systemd migration.
Though greatly disliked by all of us, systemd being part of Ubuntu 16.04 LTS (Long Term Stable) was not a deal breaker. More importantly was the perception that the release lacked stability and we had a serious sense that the upgrade would be problematic. I felt it was time to reopen the scenario to see if we were better off migrating to a different distro, or abandoning Linux entirely.
As such the original article was penned to see what the community's feelings on the subject were. The overwhelming consensus was that I was not alone with my feelings on the latest LTS, and many thought FreeBSD would be a good choice for us. Ultimately, we decided to trial Gentoo over FreeBSD for four reasons
I'll break these first three item by item
FreeBSD is divided into two parts, the core system which has basic utilities, and the ports collection which has all the add on software like Apache and such. In theory, these two components can be updated independently of each other allowing a stable base while migrating to newer software versions with relative ease. Ports can be installed from binaries, or manually compiled to suit one's taste in a relatively automated fashion bringing together the best of a binary and source based distribution. On paper, it looks perfect.
In further research, I've found that port upgrades are fragile at the best of times. Unlike Debian's APT which has strict package dependence and shared library management, port upgrades are very much upgrade and pray and its possible to hose a system in this way. The situation is similar to using EPEL on CentOS, or using Slackware that port upgrades can leave artifacts, and there's often considerable manual intervention to keep things chugging around. This is compounded by the fact that the version of Kerberos we need is in the ports collection due to incompatibility between MIT Kerberos V (which we use) and Heimdal Kerberos which ships out of the box. For those of you familiar with Active Directory, this is roughly on par with the effort required to rebuild AD from scratch along side a pre-existing forest. This meant unless we rebuilt the entire Kerberos domain (a drastic and painful option to say the least) that we could easily break a node because a ports upgrade went sideways.
Furthermore, mixing binary and source ports also have several ways it can go wrong which is problematic. To ease our system maintenance burden, its long been a goal of the admin team to have rehash and its dependencies built and deployed through package management instead of the rather horrorifying script+rsync that we use now. While we could have technically achieved this with Ubuntu by running our own buildd (or using a PPA), the sheer amount of dependencies combined with the pain of rebuilding the world ultimately doomed this to the "would be nice" pile list of ideas.
On top of this, the split architecture of FreeBSD would also mean that upgrades are no longer "one command and done" as they are with Ubuntu and Debian. Instead it becomes a matter of determining what, if any, core system upgrades are available, deploy them, then deploy/rebuild ports as needed. None of this by itself would be deal-breaking, but when compounded with the other reasons it tipped me away from this option.
For any production website, having backups is the thing you must have, not the thing you wish you had. With the exception of our development box, all our systems are backed up to off-site storage on a machine called oxygen via rsnapshot nightly (and yes, we do test our backups). However, due to the way SoylentNews is situated, there is the possibility that if an attacker ever successfully breached SN, its possible they may be able to gain access to oxygen, and rm -rf / everything.
For this reason alone, we used two separate sets of backups in case of system failure or node compromise. As mentioned many times before, SN is hosted on a number of VPSes by Linode who I continue to highly recommend for anyone's VPS needs. One very useful and handy feature of Linode is that they offer snapshotting and node backups as part of their hosting services for reasonable prices, and critical system boxes are backed up with them as a second-level of defense. Unfortunately, Linode's backup services require that their system understand the underlying filesystem format used by the OS so they can snapshot it easily. As of writing, they do not support FreeBSD's UFS or ZFS. A migration would mean we'd have to sink additional costs in a new backup system to supplement oxygen.
I'm going to get flamed for this reason, but recent events have sort of drilled this home for me, both at SoylentNews and as my work as a freelancer. During the last round of security updates, I've been fighting to get several of CentOS's security issues fixed. Red Hat (and CentOS) offer ten year support for their products but in many ways it is the wrong approach to system stability and security. A real-world issue I ran into with CentOS's support is that they ship rather old issues of dovecot, a relatively popular IMAP server.
Now, in theory, as long as security patches are backported, this shouldn't be a problem. In practice however, it means you're essentially tethered to the security features as offered at the time of the release. For example, a good number of our users are likely familiar with the Logjam attack. The mitigation for Logjam is to regenerate DH parameters to larger sizes, and change to a non-common prime. Relatively straightforward, right?
Well, not so much. Dovecot 2.0 (which is what CentOS 6.7 ships with) doesn't allow for setting of custom DH parameters, or even tweaking anything beyond the most basic TLS settings. To a lesser extent, we also had this problem with Postfix (we can't disable client side negotiation). The solution in both cases is to upgrade. That would be great, if we could in-place upgrade CentOS, or reliably upgrade the RPMs without hosing YUM at a later date. In practice, we've been forced into doing a number of arcane hacks to get most of the survey tools to report anything better than a "C" grade, with the situation worsening as time goes on. Before people say "well that's a problem with dovecot", and not CentOS, you can't get OCSP stapling (which is an important security feature to help fix SSL's revocation system) with Apache out of the box. You need to either patch Apache 2.2 in place, or upgrade to 2.4.
This problem also has shown its head on Ubuntu. To Canonical's credit, their security team actually has gone through the work of mainlining newer security features in popular products; Ubuntu 14.04's Apache 2.2 supports OCSP stapling because they patch Apache in their binaries. However this practice only goes so far. Deploying CAA records to SoylentNews in the last round of tweaks was an exercise in frustration because only the most recent versions of BIND knows how to handle the CAA record type. Once again, we're in serious voodoo territory if we tried to upgrade BIND outside of a distro release.
This brings me to my final point: trying to follow industry best-practices falls apart if you can't easily update your stack. Release based distros at best (with Ubuntu) update once every six months, or once every year or so for longer term support from other distros. That's a very long time in the security world. Furthermore, each major upgrade is an event and a large time sink in and of itself. As such I've (grudgingly) come to the conclusion that if you actually want to have real security, you need to update frequently. Furthermore, by having smaller upgrades at a given time instead of them in one large pile, you have a better chance of not getting overwhelmed at those release points.
Gentoo ultimately won by being both rolling-release based, and source based. It meant that we could easily upgrade the entire stack (including rehash's special dependencies) as a single emerge world, and then deploy. It also edged out the other options by not forcing systemd on us (and OpenRC is an absolute pleasure to debug and maintain in comparison). We've also discussed the issue at length and have determined how we're going to approach the rather daunting task ahead of us.
The first step, which was already completed, was to migrate our development system over to Gentoo to get an idea of how much pain we're going to be in. This was accomplished by booting the system in rescue mode, moving "/" (i.e. the root of our filesystem) to "/old-rootfs", extracting a stage3, cooking the kernel, and rebooting. audioguy and TheMightyBuzzard worked out the correct set of USE flags for our environment, and I used the serial console to do the actual changeover. Aside from Varnish breaking, the migration was actually relatively smooth if time consuming. Right now, we're still wrestling with varnish, but after kicking MySQL cluster's init scripts and copying configs, it sputtered to life and dev.soylentnews.org popped back onto the internet.
The next steps is to create ebuilds for hesinfo (a Hesiod support tool that Gentoo doesn't ship in their hesiod package), and then to create a custom stage3 with our kernel config and base system with catalyst. We're going to work out the set of packages we need and configure lithium to work as a binary package source for portage. In effect, every package we need will be compiled once on lithium, then published via a private portage repository. Other machines will simply be able to emerge world and download the pre-tested and compiled binaries in one fell swoop keeping the software stack across SoylentNews consistent across the organization. As an added bonus, we can now easily migrate our custom set of compilation scripts to ebuilds and have sane package and dependency tracking for the entire site infrastructure.
Since most of the site infrastructure is fully redundant, we don't expect too much downtime or breakage as we begin migrating other boxes from Ubuntu. As usual, we'll keep the community apprised of our status, as well as if we need to schedule actual site downtime during this period. While some of us might thing we're insane, I will just note for the record we took a similarly drastic step of migrating to a IPv6-only backend two years ago in the name of administration sanity, and serving SN needs best. As always, I'll be reading and commenting below.
And no systemd whatsoever
That sold me right there.
i understand the FreeBSD issue. I love FreeBSD but I don't run it on a production system in an "enterprise" setting so I can see how the dual ports/pkg system can be touchy (although I never use the pkg system myself and have always used ports). Right now, I'm putting together a VM for a course I am giving and ended up going for Lubuntu against my will, simply because it provided the best cde performance for the buck out of the box. but seriously fuck systemd...
Are people still really scared of Systemd? If so you should just really switch over to Windows at this point because Linux systems are just going to be too hard for you to use. Learn to embrace change yo! This is what I see in my head when all the old people on their rascal scooters complain about Systemd.
Your assertion is that, yes, there is a giant f*ing hole in the house, but it's unreasonable to be unhappy about that.
Additionally, disliking something is not the same thing as fearing it.
My assertion is that everyone is scared of change and Stewie is funny. Man fears what he does not understand and tries to mask fear with hate.
SystemD per se isn't the issue, it's 1) that it seems to be a vehicle for making RedHat money, i.e., "vendor lockin through obscurity" and 2) the way it's implemented is very monolithic and difficult to configure, thus breaking the shit out of The Unix Way (TM).
Those of us who've either been using *nix a long time, or like me, started with something that forces you to get down and dirty with the guts of the system, have a creeping, rotting feeling that "this is not beautiful, this is not just, this is not open" when dealing with SystemD as it is. SysVInit has issues, yes, but OpenRC does wonderfully and for the life of me I cannot understand why it didn't become standard. I always knew my devotion to Gentoo would pay off...
Notice how redhat based systems are mentioned as easy to hack in the recent wikileaks?
Ever wonder why.
Defects by design.
Hope someone checks out where Red Hat gets their money flow from. If they have done a "RSA deal" or if their board is way to cosy with certain elements of the government.
RedHat's largest single client is the US Department of Defense.
Red Hat is only easy to hack if you turn off selinux. If you're not using selinux you're wrong. The more used an operating system is the more vulnerabilities are found. That's why you see tons of exploits for firefox and not lunascape.
1) I'm very curious how you think Systemd makes Red Hat any money. Can you show any proof or are you just babbling about "vendor lock in" because you don't like enterprise operating systems? On that note you CAN force another init system if you really want to, but that's like sending back a fancy steak and asking for a happy meal. There's also no obscurity. https://github.com/systemd/systemd [github.com] It's open source so you can review all of the code and understand the inner workings. Systemd is incredibly straight forward once you take the time to learn it. How is it not open?
2) Systemd is far easier to configure than Upstart or any of the older sysv init systems. A unit file is VERY simple to build and adjust. What would take over 30 lines in an init script takes 10 lines in a unit file. The Unix way is old and needed to be changed.
Been using Linux since the early 90's and I started with Slackware. I've seen a variety of init systems and Systemd is the best so far. So don't try and pull the "Been using it longer" card.
Um... Stewie is complaining about a broken house.... I think Stewie is being completely prudent in that clip.
And you sound like a naive young jerk who doesn't even comprehend his own limitations. Go look back at your old school pictures, the horror you experience at seeing your young "fashion sense" will be similar to what happens when the clouds finally lift from your mind and you can see the bigger picture. So many techies can't comprehend that yes, the world is that fucked up, and they have some weird faith that corporations wouldn't do nasty stuff because they'd go out of business... hahahahahahaha
Depends on your definition of young. If people in their 50's are young then I'm a spring chicken baby! Also while the world is fucked up I don't see what anything you said has to do with systemd. Are you saying systemd is the trump of linux? Corporations are people dude. Don't bash people. It's just wrong. Trolllollollollollollollollol. Seriously though what big picture are you referring to?
Not sure about the GP but the big picture on systemd, IMO, would be bad by design, i.e. the monolithic opaque design. I've certainly seen again and again that from an engineering perspective, it is a bad design. It's is prone to breakage and difficult/impossible to fix. The only slightly positive comment I could say about it is that, it can be a useful design for trying to stop competitors and for locking others out. But I'm not trying to 'compete' with my OS. I want something that works as stable as possible and is easy to fix when it doesn't work. I see systemd as technical change that's non-cooperative. This from my user perspective is undesired.
But no fear. We use purposely crappily designed tech and systems every day. I don't fear a crappily made screw driver. But I'm sure going to avoid using the piece of junk if I can get my hands on something better.
> Are people still really scared of Systemd?
you mean, that piece of software that is behaving exactly as its detractors predicted?
Please explain how systemd is behaving badly. My complaint that old sys admins hate change is pretty evident and well documented. See your post above for proof. But what problems is systemd causing?
Just like any other piece of software. If it's properly setup it runs perfectly.
The only weirdness I have personally seen so far is that the filesystem check did not run properly on a dirty boot. Can't have a 5 minute Fsck hold back parallel booting, now can we? The Knoppix live DVD got rid of systemd because parallel boot slows things down considerably when seeking costs up to 300ms.
There was that bug with systemd re-implementing the rm utility...poorly [github.com]
Systemd is behaving badly by trying to do everything: with a development team that apparently does not take serious bugs seriously.
The advantage of "the UNIX way" is that you can rip out and re-implement troublesome components. With systemd, it is largely an "all or nothing" proposition.
Wow ... hadn't heard of THIS one lol. I guess bricking the machines of people who did rm -rf --no-preserve-root / wasn't stupid enough for them.
Do you know what exactly "R!" is, why it exists, etc.? I can't find too much documentation on this command -- if it is a command -- not unusual for SystemD's documentation to be poor, of course.
Good question. I had to go back to the bug report to find it.
R is used in configuration files to tell systemd what directories to routinely delete.
It is actually documented here: tmpfiles.d(5) [freedesktop.org]
Good find. Thanks for the info.
The bug you linked is an excellent example of the problem with their style and attitude. Reimplementing "rm" is NIH to an absurd and terrifying extreme.
They apparently needed a way to clean up files without using simple shell scripts....
Well, bob_the_systemd_troll - I don't think anyone "fears" systemd. We distrust it, generally. Except for some of the totally clueless, who have no idea WTF systemd is. "WTF is an init system, anyway?" Those of us who don't actually distrust it, dislike it. What we all want to know is, who is paying whom to make systemd default in all the distros? To date, there has been no compelling reason to choose one init system over another. But, systemd is growing in popularity - among distro maintainers. Why?
Since systemd is fully open source I'm wonder what there is to distrust. Also I know fully well what an init system is and have probably been writing init scripts as long as if you have (if not longer). The reason why systemd is replacing upstart and other init systems is because it's better. Unit files allow more flexibility and simplicity of setup. With cgroups being so heavily used I have full control over resource consumption as it's being launched. I have the ability to closely monitor every single process under a service. Lets look at the legacy systems. If I run 'service httpd status' I get a single PID, but very little information as to how apache is actually running. I also can define dependencies in a simple straight forward manner. This makes it so I don't have to rely on a number based order.
TLDR, systemd has tons of benefits and is easy to use. What don't you "trust" when you can read over the source code for yourself?
I'll grant that AFTER you understand WTF systemd is doing, it is relatively "simple", in that, everything can be found in more or less one place.
What's to distrust? Monoculture is always untrustworthy, in and of itself. Why has Windows always been so easy to hack? Well, because damned near every Windows system in the world responds to the same outsite stimuli as every other Windows system in the world. If you can get into one Windows system, you can get into damned near all Windows system by doing the same thing again and again. I believe the term "script kiddie" specifically targeted Windows "hackers" who knew how to use a script, but had little if any idea how it worked. With Unix-likes, the script kiddie thing never got the traction that Windows users got. Pretty much, each system had to be targeted, and the majority of them didn't respond to the same outside poking and prodding that any other system responded to.
Give it a couple more years, and anyone who can exploit a systemd system, will be able to get into half or more of the Linux systems in the world.
I think the *nix world is losing something valuable, when all of the distros make the same init system default.
Unlike others, I don't "hate" systemd. Not yet, anyway. But, I distrust it. And, I have little faith in the future of systemd. It threatens to make Linux more Windows-like than Unix-like.
I've started using Arch (Manjaro, really, because of the easy install --my free time seems to be so unavailable anymore) because of the speed: started hating the sloooooowness of Ubuntu.
If only Gentoo had an 'easy' install, i'd probably switch (from what i can see, aren't arch and gentoo 'basically' the same thing?)
If i get a patch of free time, i might just install Gentoo, though. At least on a separate partition, dual boot with arch/manjaro.
Will look into removing systemd from arch, but it looks like a difficult time, from what i'm reading.... :(
Have a look at Calculate Linux. It's essentially gentoo with a binary overlay and some handy admin type scripts thrown in. If you like you can remove all things Calculate after install and just have a Gentoo system. Plus it's quite a lot easier to install.
oh, yeah... main reason for posting here:
Bob? Runaway put his balls in your court.... whack away! :)
> But, systemd is growing in popularity - among distro maintainers. Why?
Because it is so much better than alternatives that it even worth switching the default.
> who is paying whom to make systemd default in all the distros?
Must be a consortium of NSA, FSB, Mossad and the Chinese to haxxor all of the internet. Isn't it obvious?
That just sounds crazy. It's clearly our lizard overlords trying to keep us in check. Linux admins were getting too close to the truth.
People are not scared of systemd, just see it as wrong minded and going in a direction they care not to follow.
It's true that many popular distros have become redhat derivatives and for those that don't notice or care that will be their linux world, they've been captured.
But those people don't contribute in any great measure, only users have been captured.
For the people who do care, do contribute the only choice is to move away from systemd/linux in exactly the same way as we moved away from windows.
This is not a zero sum game, systemd people seem to think they have 'won' others just see them as damage and are routing around them and following linus' advice, to paraphrase:
"linux is a big project with lots of people, find people you can and like work with, doing things you care about"
And no systemd whatsoever.
Are you sure? Distrowatch says gentoo included systemd in 2014. https://distrowatch.com/table.php?distribution=gentoo [distrowatch.com]
True, it is, however, an optional package and can be avoided entirely by making sure the -systemd flag is set in your USE flags in make.conf.
Thank you! I didn't know about that flag. I've been wanting to try GenToo and now I will. Tired of the "end of support" crap with others (like CentOS). Been a longtime SlackWare nut and even though it has versions, you can "keep it rolling" well too.