News for hackers. Stuff that matters.
Re:Count me as a systemd convert by api on Thursday May 05, 2016 @07:51PM (#11640623)
IMHO sysvinit and systemd both suck in that they're both overly obscure, overly arcane, overly complex, and poorly documented. Systemd replaces a legacy pile of hacks mess with an over-engineered tower of babel mess.

An improvement would be something with modern syntax, sparse features, and good docs.

Re:Count me as a systemd convert by lomnakkus on Thursday May 05, 2016 @10:48PM (#11641354)
> IMHO sysvinit and systemd both suck in that they're both overly obscure, overly arcane, overly complex, and poorly documented. Systemd replaces a legacy pile of hacks mess with an over-engineered tower of babel mess.

This is an easy criticism to make. What's no so easy is to actually implement what's needed for a modern system and still achieve what you seem to be asking for. Modern systems are unbelievably complex beasts.

> An improvement would be something with modern syntax, sparse features, and good docs.

This is getting pretty silly and it just looks like you're reaching for anything to criticize here.

What does "modern syntax" mean and why would it be an improvement on the INI-like syntax of systemd configuration?

What earth does "sparse features" mean? You don't want to support everything that a modern system requires? (Take modern system to mean everything from containerized servers to desktops to laptops to a mobile phone. All places where systemd has its place.)

You don't think systemd has "good docs"? IME Systemd has unbelievably good reference documentation for any type of Free Software (in the Unix style of man pages, no less!).

Perhaps tutorial-like documentation is somewhat lacking, but the "systemd for Administrators"[1] blog series is pretty good IMO. (Though, granted, a bit out of date, perhaps.)

[1] http://0pointer.de/blog/projects/systemd-for-admins-1.html

Re:Count me as a systemd convert by snuxoll on Thursday May 05, 2016 @10:51PM (#11641364)
Speaking from experience, classic sysvinit was the bane of my existence when trying to deploy Python web applications. Having to use things like supervisor because writing init scripts is such a pain is a hack, nothing more. Writing a 10 line systemd unit file packaged in with the RPM I use to deploy my app is much less of a headache, and I welcome the change - combined with parallel startup I don't have to block nginx from loading while my application loads (or vice-versa).
Re:Count me as a systemd convert by nitrogen on Thursday May 05, 2016 @11:15PM (#11641435)
Ubuntu's Upstart was also pretty nice in this regard.
Re:Count me as a systemd convert by lomnakkus on Thursday May 05, 2016 @11:39PM (#11641518)
It was certainly nicer than sysvinit, but its event-based model absolute hell to debug, IME. (It basically required the user to program a state machine around all the events that could happen on a system.) Just look at the bugs on Upstart in the Ubuntu bug tracker if you don't believe me. There were bugs in there that languished for years because they were basically unsolvable.

The original author of Upstart basically admitted (to his credit!) that systemd's model is superior after Upstart had been in out in the wild for a few years.

Re:Count me as a systemd convert by snuxoll on Friday May 06, 2016 @11:22AM (#11644565)
Upstarts event-driven mess made it extremely hard to debug and rationalize about your dependencies for a service. systemd's approach of a basic dependency graph for services is a lot easier to work with, plus some bonus features like socket activation and work directory creation that upstart doesn't have.

I have a python webapp hosted inside uwsgi reverse proxied by nginx, adding `RuntimeDirectory=mycoolapp` to the unit file automatically creates and destroys `/run/mycoolapp` every time the unit starts and stops. I just plop my socket file inside the runtime directory (which is automatically created with the correct uid/gid based on the user/group the unit runs as) and fly away, I don't have to manage some directory inside /var/ and deal with an rpm scriplet to ensure the correct owner/group are set on it after install.

It's all the little things that systemd does that really make one appreciate it, they add up.

Re:Count me as a systemd convert by themartorana on Thursday May 05, 2016 @11:28PM (#11641487)
Thank you. I feel like this gets overlooked. It worked well, and was easy to grok. Too bad it lost support.
Re:Count me as a systemd convert by JdeBP on Friday May 06, 2016 @07:09AM (#11643043)
See the "red herring" discussion in http://uselessd.darknedgy.net/ProSystemdAntiSystemd/ and https://news.ycombinator.com/item?id=11641426 on this very page.

It's definitely wrong to think that upstart was overlooked when it came to the Debian hoo-hah, furthermore. Upstart was one of the four major contenders, and one of the two front-runners.

Re:Count me as a systemd convert by SEJeff on Thursday May 05, 2016 @10:44PM (#11641337)
On your Linux system, type:

man -k systemd

There is extensive and well written documentation for all aspects of systemd so I'm going to call BS on your post. Also, the syntax is consistent and documented. It is infinitely simpler than sysvinit. Either you're trolling, or know very little about systemd. Note that I'm a fan, but far from an apologist.

Re:Count me as a systemd convert by ktRolster on Thursday May 05, 2016 @10:55PM (#11641382)
Here's the documentation for systemd-random-seed: https://www.freedesktop.org/software/systemd/man/systemd-ran...

What are the command-line options that are available to that tool? Without looking in the source code.

>Note that I'm a fan, but far from an apologist.

An apologist is merely someone who offers a defense of something. It comes from the greek word ἀπολογία, "speaking in defense". Thus you are an apologist, even though you're not dogmatic.

Re:Count me as a systemd convert by Grishnakh on Friday May 06, 2016 @10:54AM (#11644382)
>It comes from the greek word ἀπολογία, "speaking in defense".

I just want to point out here that just because an English word comes from some Greek word, that doesn't mean the English word actually means that today. You are correct about "apologist" (according to Wiktionary at any rate), it just means someone who speaks in defense of something, but there are other words where the meaning has changed over time. English is a language that is defined by its popular usage, and this can change over time so a word may not mean the same thing today as it did just 100 years ago.

A good example is the word "pathetic". According to Wiktionary, it comes from Greek:

'παθητικός ‎(pathētikós, “subject to feeling, capable of feeling, impassioned”), from παθητός ‎(pathētós, “one who has suffered, subject to suffering”), from πάσχω ‎(páskhō, “to suffer”).'

Obviously, those don't bear that much resemblance to the current popular meaning, which is:

'1.Arousing pity, sympathy, or compassion.' or '2.Arousing scornful pity or contempt, often due to miserable inadequacy.'

In fact, other European languages like German have this same word (I believe this is called a "cognate"; I am not a linguist), from the same root, but their meaning is entirely different and they get confused when they learn English and encounter this word since we use it in such a different manner.

TL;DR: Greek or Latin roots are interesting from a historical and linguistic perspective, but they're no guarantee of the current definition of an English word.

Re:Count me as a systemd convert by tremon on Friday May 06, 2016 @07:04PM (#11647337)
I believe this is called a "cognate"

A cognate is simply a pair of words from the same stem (origin); it doesn't matter if their meaning is still the same. The opposite term is "false cognate", which refers to words that sound alike and mean something similar but stem from different roots.

Regardless of origin (so cognate or not), if two words in different languages sound alike but have different meaning, they're called false friends.

</pedant>

Re:Count me as a systemd convert by ktRolster on Friday May 06, 2016 @12:32PM (#11645034)
Indeed, the word apologize actually does mean apologize
Re:Count me as a systemd convert by kbenson on Thursday May 05, 2016 @11:24PM (#11641473)
> What are the command-line options that are available to that tool? Without looking in the source code.

While not the greatest example of documentation, it's not completely horrible. It accepts a single parameter which is the seed (yes, I looked at the source). I imagine it was an oversight for a very simple program with a singular purpose and which isn't meant to be called manually. It's not great, but it doesn't carry the same weight with me as if there were multiple possible or required arguments, or even a single optional one. Perhaps there are examples like that, I don't know.

It's hard for me to get worked up about the level of documentation of systemd compared to SysVinit, when things like OpenBSD exist that achieve such a high level of quality that they are both utterly shamed, and appear relatively similar in their mediocrity.

Re:Count me as a systemd convert by reddytowns on Thursday May 05, 2016 @11:56PM (#11641587)
Accepting something as cryptographicly significant as a rng seed as a command line argument makes my security whiskers bristle.

Especially since the ultimate destination for that value is a root owned 600 perm file.

Re:Count me as a systemd convert by ktRolster on Friday May 06, 2016 @02:24AM (#11642076)
It doesn't do that, the gp post misread the source code. It reads the data from a file defined at compile time.
Re:Count me as a systemd convert by majewsky on Friday May 06, 2016 @05:43AM (#11642742)
As can be checked easily with `systemctl cat`:

  $ systemctl cat systemd-random-seed
  # /usr/lib/systemd/system/systemd-random-seed.service
  [...]
  ExecStart=/usr/lib/systemd/systemd-random-seed load
  ExecStop=/usr/lib/systemd/systemd-random-seed save
  [...]
Note how the executable is not even installed to /usr/bin, because it's explicitly not supposed to be called by a user.
Re:Count me as a systemd convert by kbenson on Friday May 06, 2016 @10:14AM (#11644089)
Yes, I skimmed the file far too quickly. I was working off some assumptions from the portion I saw that errored if argc != 2, with an error along the lines of "There must be only one argument".
Re:Count me as a systemd convert by ktRolster on Friday May 06, 2016 @12:29PM (#11645016)
That's fine.

Now try to do a retrospective to figure out how the mistake was made, so it doesn't happen again

Re:Count me as a systemd convert by kbenson on Friday May 06, 2016 @12:40PM (#11645088)
> Now try to do a retrospective to figure out how the mistake was made, so it doesn't happen again

What? It doesn't affect my point in any way. I looked at multiple other man pages for services before posting, and noted that of the ones I checked, they all listed options for the service and/or command. I stand by other other portion of my comment (whether you interpreted them as I meant, or in some more negative light that might induce the negativity I feel from this reply).

I noted my reasoning on why I didn't find your example entirely compelling, but also noted that there could well be other examples that fit the criteria of what I considered more problematic.

I still believe the man pages are lacking quite a bit with respect to OpenBSD equivalents.

Re:Count me as a systemd convert by SEJeff on Thursday May 05, 2016 @11:18PM (#11641446)
Ok I'll give you that. Also up vote for the pedantic retort. Well written, and I don't know Greek, so I learned something new.

Look at the docs for something like systemd-service or -exec or -tmpfiles, etc. You found one that as bad. I'm sure you can find a few more. Now find docs for some random 1000 line shell scripts that aren't the code. At least there is a very obvious and consistent way to set the ulimit for my services, even if they don't support pam_limits via systemd, or an obvious way to extend the start script without hacking up the init file, etc. Please allow me to rephrase and say the documentation overall is so far ahead of th documentation for any implementation of init scripts and sysvinit it isn't funny. And this is coming from someone who spent most of his career as a UNIX / Linux SysAdmin.

Re:Count me as a systemd convert by ktRolster on Thursday May 05, 2016 @11:33PM (#11641502)
Also up vote for the pedantic retort.

Nah, it wasn't meant as a retort. It was merely an aside that I thought you might find interesting. And apparently you did :)

Re:Count me as a systemd convert by JdeBP on Friday May 06, 2016 @08:22AM (#11643419)
Re:Count me as a systemd convert by JdeBP on Friday May 06, 2016 @08:06AM (#11643347)
> There is extensive and well written documentation for all aspects of systemd so I'm going to call BS on your post.

As long as you are prepared for the rest of the world to call BS on what you say here, as well. (-:

It's only "extensive and well written" if one sets the bar for those two quite low, and has very lax standards for doco. Unfortunately, people often do set the bar low in the Linux world. But to those from other worlds the words that come to mind are "acceptable" and "mediocre". As someone else has already mentioned here, and as people have pointed out passim over the years, the expected as the norm quality of doco for the BSD world is noticeably a higher standard than in the Linux world.

But it's not the BSD world alone where the norm is higher. The norm for the commercial Unices is and was higher, too. A case in point:

I wrote https://news.ycombinator.com/item?id=11629824 a little while ago. Checking my recollection, I referred to several manual pages for the rlogin command. The HP-UX and Solaris manual pages for rlogin actually had whole subsections about escape sequences, beginning with the general notion then proceeding to specifics of the various individual sequences. The HP-UX manual even proceeds to discuss how to send the escape character onwards, and how to send escape sequences across a daisy-chain of rlogin sessions -- something that still applies to SSH today.

The Linux rlogin manual has 1 paragraph, doesn't mention that there's actually a general concept behind the specifics that it lists, doesn't discuss how to escape the escape character, and doesn't discuss daisy-chaining.

If you're just about to point to your Linux ssh manual as a counterexample and observe the treatment that it gives escape characters, as good as that of the HP-UX doco, then scroll to the bottom of the page and enjoy the fact that you're reading BSD doco written by BSD people. (-:

Re:Count me as a systemd convert by jononor on Saturday May 07, 2016 @03:53PM (#11651115)
What aspects of systemd is not well documented? I am sure it exists, but if you're calling BS, better to be explicit.
Re:Count me as a systemd convert by secstate on Thursday May 05, 2016 @08:10PM (#11640715)
Amen sir. Seems crazy that the tipping point for the OP was being able to require certain services to have come up before others. That seems a fairly elementary aspect of process supervision.

For my money, runit gets the nod for modern syntax, sparse feature ... docs are coming along ;)

Re:Count me as a systemd convert by txutxu on Friday May 06, 2016 @05:11AM (#11642636)
When I was a child, I did translate knoppix boot messages, to my mother language, for a local project. In colours.

For me was great and rewarding, a nice learning experience, about livecd's initialization and linux in general at the time.

I don't feel like I could have accomplished the same experience trying to do the same with systemd (with my age and knowledge and resources at the time).

Still more difficult, being a Debian user, where systemd is not in the same shape than RHEL based distros, and documentation is out of sync, or missed in blogs...

What you propose reminds me to openrc or the gentoo dependency based init system.

I Love too the BSD/Slackware/busybox init style (single script init). But I'm a scripting mad.

One of my reasons to live, of and for, opensource, is the ethics and freedom behind it. Other one was being more K.I.S.S. on my system interactions than with MS based products.

I feel capital interests hurts some things very hard to obtain, in voluntary groups of people, using guerrilla warfare, and without any care.

Eventually I've deployed some Debian stable (Jessie) systems with sysvinit this same year, and I'm grateful that people in Debian did that option possible.

I'm not sure if a third, or a new option with modern syntax and sparse features as you say, could be better than the years we've been moving the world using sysvinit or upstart or others... but we, the tech people, seem to like new things!

Totally agree about the docs care, specially when there are distributors involved.

When there are changes in opensource, there should be a lot of more care IMHO than in closed products, and this is not always the case.

Unfortunately people, by brain nature, is driven a lot by media and marketing, two weapons of venture capital techs. And if service providers insert X and media inserts X, people who did never maintain a critical and complex deployments using X and did integrate a lot of things with them, starts talking about the smell of the clouds.

What implementation do you suggest, to reach what you propose? I think is not easy :)

My main feature request could be: reliable and malleable (not easy too).

> An improvement would be something with modern syntax, sparse features, and good docs.

Loved your tower of babel mess definition, upvoted just by that comparison.

Have a nice day.

Re:Count me as a systemd convert by JdeBP on Friday May 06, 2016 @06:59AM (#11642994)
> I'm not sure if a third, or a new option [...] as you say, could be better than the years we've been moving the world using sysvinit or upstart or others

* 1. System 5 rc

* 2. upstart

* 3. systemd

* 4. "third, new, option"

The "Uselessd Guy" critiqued the thinking that underlies this strange way of counting to three that is being employed here, in http://uselessd.darknedgy.net/ProSystemdAntiSystemd/ .

See also https://news.ycombinator.com/item?id=11641426 on this very page.

Re:Count me as a systemd convert by ams6110 on Thursday May 05, 2016 @10:45PM (#11641342)
Re:Count me as a systemd convert by JdeBP on Friday May 06, 2016 @04:04AM (#11642421)
Because the BSDs don't agree amongst themselves on how services are configured in /etc/rc.conf , OpenBSD (whose tool this is) being a major outlier, this tool does not interoperate at all well with anything other than OpenBSD.

For those with OpenBSD habits, there is a compatibility shim in the nosh toolset that translates to native nosh mechanisms.

* http://homepage.ntlworld.com./jonathan.deboynepollard/Softwa...

Re:Count me as a systemd convert by pmoriarty on Thursday May 05, 2016 @09:56PM (#11641161)
Have you tried runit?[1]

[1] - http://smarden.org/runit/

Re:Count me as a systemd convert by exabrial on Thursday May 05, 2016 @08:12PM (#11640723)
My personal opinion is it's Redhat's way of seizing control of the Linux ecosystem... But that's a fringe theory
Re:Count me as a systemd convert by AckSyn on Thursday May 05, 2016 @10:27PM (#11641277)
Personally, I'm waiting for Linus Torvalds to make his own init system in the event he's fed up with all the sysvinit and systemd bullshit.

Linux Kernel. Git. $torvaldsinitsystem ?

Re:Count me as a systemd convert by ktRolster on Thursday May 05, 2016 @11:00PM (#11641396)
He's not going to because it doesn't affect him personally. And let's be honest, systemd isn't that bad, and has some benefits. It's not worth getting religious over.

You'll know there are too many dependencies on systemd when people who don't want it (Devuan, Slackware, openBSD) can't boot a decent system without it. I don't think we're in danger of that: people who don't want systemd don't need it.

Re:Count me as a systemd convert by TheyW0ntL1sten on Friday May 06, 2016 @06:57AM (#11642989)
He's actually said that he doesn't think that systemd is that bad. He didn't like the way that they submitted patches initially. He said that he doesn't have a problem with the approach and he said that people make too much of the "unix philosophy" because passing bits of text between programs really hasn't been the way that unix systems have been designed for several decades.
Re:Count me as a systemd convert by txutxu on Friday May 06, 2016 @05:41AM (#11642734)
I could see sysvinit as $torvaldsinitsystem because it has been booting linux around the world...

Git did start as a tool, and has been extended, a lot.

The same than the kernel booting was extended across the years to cover usage cases.

If he writes pid 1 code by itself, to get rid of a issue, as he did with the kernel and with git, we will call it the Linus pid 1. But as others said, maybe he doesn't has personally annoying issues with this.

Re:Count me as a systemd convert by felixgallo on Thursday May 05, 2016 @08:35PM (#11640833)
hardly fringe -- it's straight out of the unix wars historical playbook. Every unix vendor tried to make their own conflicting systems in order to promote lock-in. Solaris, AIX, DG/UX, SCO, everyone, all the time. That it's taken so long in the Linux space is pretty amazing, but of course that it's happening is super depressing.
Re:Count me as a systemd convert by marcosdumay on Thursday May 05, 2016 @08:50PM (#11640897)
That requires the systems to be proprietary, and, well, conflicting. Systemd isn't proprietary, and with everybody's adoption it's now universal, not conflicting.

I'm not sure where this tendency of Red Had for taking over the ecosystem comes from. The only rational basis for it I can think of is they wanting Linux to stay complex, so they can sell support. But it's way more likely it comes simply by them hiring a big number of developers, and not having enough in-house problems to solve - after that they must lead, not follow (for marketing reasons), so they must push their solution onto everybody.

Re:Count me as a systemd convert by msbarnett on Thursday May 05, 2016 @11:49PM (#11641559)
> Systemd isn't proprietary, and with everybody's adoption it's now universal, not conflicting.

Within Linux. Systemd is explicitly anti-portability across Unixes, and encourages dependencies on it that make life increasingly hard for the BSDs, OS X, etc.

So, yeah, if you zoom out a little from Linux, systemd fits right in with the UNIX wars.

Re:Count me as a systemd convert by Aloha on Friday May 06, 2016 @01:17AM (#11641871)
Linux won the UNIX wars, by bringing an end to them - yes BSD exists - but in both mindshare, and marketshare Linux beat the rest of them out. Beyond that, sysv was never relevant for BSD - and I don't think many Linux distros went with rc.d either.

So in the end, because of compatibility shims on both sites - and that our software build systems have evolved to support multiple init systems, its largely a moot point.

Re:Count me as a systemd convert by michaelmrose on Thursday May 05, 2016 @09:21PM (#11641037)
Conway's law

Organizations which design systems ... are constrained to produce designs which are copies of the communication structures of these organizations

It could be that they both benefit from building complex systems and believe honestly that such systems are the optimal solution from their own perspective. This requires no bad faith or conspiracy theories.

Its simultaneously possible that such a complex solution is sub optimal for other parties.

They are under no obligation to build a solution that is best for other parties and others are under no obligation to adopt or like such solutions.

Its entirely possible for two parties to disagree without either being evil.

Re:Count me as a systemd convert by digi_owl on Friday May 06, 2016 @03:50AM (#11642384)
In regards to this, i ran into a blog posting over at blogs.gnome.org, about Fedora's workstation project. That alone should raise some red flags about mixing roles.

But then i start reading and seeing the guy name others from seemingly unrelated projects, thanking them for their efforts.

But lo and behold, once i start running the bloggers name, and the names he mentions, they all come up as Red Hat employees.

Re:Count me as a systemd convert by nickpsecurity on Thursday May 05, 2016 @09:57PM (#11641166)
"That requires the systems to be proprietary, and, well, conflicting."

No it doesn't. Different OSS projects already compete with each other in many details of design and implementation. They try to win over users or mindshare instead of dollars. Some with financial backing also have dollars in mind. Even lock-in is approximated by things that many apps depend on but are too big to change without risking a break.

Re:Count me as a systemd convert by zanny on Thursday May 05, 2016 @11:18PM (#11641452)
But this kind of competition, or even intent behind a product, is thus not unethical or harmful to the users.

Let systemd try to take over whatever it wants. It is still LGPL licensed, so I can do whatever I want with it as well. Those writing it can do whatever they want - nobody has forced any distro to adopt systemd bseides Red Hat themselves, insofar as it was their project principally so of course their own distro used it.

Arch, Suse, Debian, Ubuntu... all game to use it under consensus. I personally think there is no better outcome than well engineered and linked software seeing uniform adoption to let the ecosystem move on to bigger problems. The degree to which systemd's pervasiveness has enabled the vast simplification and feature richness of so many disparate aspects of development on the platform only reinforces that belief - the ease of writing and shipping service, socket, requires, triggers, timer, mount, etc files. The ubiquitous availability of a session dbus. udev pervasiveness, cgroups already being there and setup, there is so much feature richness systemd gives everyone up the stack to claim shell scripts and grit were better is to say you should never stop reinventing the wheel to build the cart until the wheel is cast from solid gold.

Re:Count me as a systemd convert by ktRolster on Thursday May 05, 2016 @11:01PM (#11641398)
I'm not sure where this tendency of Red Had for taking over the ecosystem comes from.

Because they're willing to fund the work.

Re:Count me as a systemd convert by digi_owl on Friday May 06, 2016 @01:47AM (#11641961)
No, it does not need to be proprietary. Instead one need to have control over the commit rights of core repositories.

As for conflicting: i think you have missed server years of conflict, never mind that you can only ever have one process as pid1 on a unix setup.

And if something like your session tracker depends on pid1 being systemd, you get conflict.