News for hackers. Stuff that matters.
Re:A Thank-You Note to the Hacker News Community from Ubuntu by tie_ on Thursday April 06, 2017 @03:36PM (#14053880)
I have a strong dislike for systemd, so while I'm really sorry that upstart "lost" the fight, Ubuntu gained a lot of respect in my eyes with the decision to go with the rest and avoid unnecessary fragmentation. This could have easily ended up another as another community rift, slowing down everybody along the way.

Now they do it again with Wayland/Mir! It actually takes a significant amount of both balls and goodwill to give up on the product that you invested so much into for the sake of aligning better with your open source community. Bravo!

FWIW, I too would like to keep the DE experience of Unity, and especially the Dash panel and shortcuts. If that expose-text-search could scan non-focused browser tabs that would be a killer feature, but that's for the other thread.

The idea of "Let's simply ask HN users what they think" is a gem, that I suspect will now make it into many PMs' playbooks ;)

Re:A Thank-You Note to the Hacker News Community from Ubuntu by sciurus on Thursday April 06, 2017 @09:40PM (#14056367)
"It actually takes a significant amount of both balls and goodwill to give up on the product that you invested so much into for the sake of aligning better with your open source community."

They didn't do it to align with the open source community. They did it because Canonical wants outside investors, but potential investors don't think Unity can make money.

https://news.ycombinator.com/edit?id=14056369

Re:A Thank-You Note to the Hacker News Community from Ubuntu by henriquemaia on Thursday April 06, 2017 @10:02PM (#14056481)
Why not both? It hasn't to be an either/or type of thing.
Re:A Thank-You Note to the Hacker News Community from Ubuntu by MR4D on Friday April 07, 2017 @10:48PM (#14065004)
True, but companies don't often come out and say that straight up. Usually they let things die on the vine. I think the OP was trying to say they could have taken the easy way out, but didn't.
Re:A Thank-You Note to the Hacker News Community from Ubuntu by peterwwillis on Thursday April 06, 2017 @05:15PM (#14054697)
I don't think anyone has ever dropped a distro because it wasn't using systemd, just like I don't think anyone ever moved to Ubuntu from a sysvinit system just because Ubuntu had upstart. I don't think there was ever a "fight" - they simply wanted to use systemd, and so they did.

If Slackware ever moves to systemd, it will be a sad day, but i'll keep using Slack because it's the whole distro that I want, not just how the system initializes services. If I could deal with Windows's bullshit, I can deal with systemd. Just like ConsoleKit, and PolicyKit, and NetworkManager, and UPower, and PulseAudio, and HAL, and UDev, and DBus, and all the other annoying crap that's been shoved down our throats over the years. Now I know how old people feel when they talk about modern cars...

Re:A Thank-You Note to the Hacker News Community from Ubuntu by mgbmtl on Thursday April 06, 2017 @05:30PM (#14054816)
> "I don't think anyone has ever dropped a distro because it wasn't using systemd"

That's an odd assumption. I have. I'm a big fan of standardisation.

I understand some people not liking systemd, but there are a lot of folks out there who really prefer it. Once I started adopting it, I no longer needed/wanted to support cross-distro start scripts, since systemd does that. So non-systemd distros were dropped.

Re:A Thank-You Note to the Hacker News Community from Ubuntu by peterwwillis on Thursday April 06, 2017 @05:56PM (#14055035)
Most distros have different package managers, different flavors of compiled and packaged software, different libraries, different system management tools, and different kernel versions. Yet you switched distributions because of the two whole different methods of start-up scripts. The one thing that only has to be written once, and then forgotten about forever.
Re:A Thank-You Note to the Hacker News Community from Ubuntu by rtpg on Friday April 07, 2017 @12:28AM (#14057132)
Isn't this the point though?

We're moving more and more to having unified low-level services across Unices, so it stops being about stupid things like "Oh sorry, Arch can't run this because it uses its own audio stack even if we're just using audio to make a notification sound", and starts being about the things that are fundamentally different about the systems.

Think about how nice it is that we don't have to recompile most things for most kernel versions. Why do we have to set up multiple startup script mechanisms?

Re:A Thank-You Note to the Hacker News Community from Ubuntu by peterwwillis on Friday April 07, 2017 @01:44PM (#14061842)
> Think about how nice it is that we don't have to recompile most things for most kernel versions.

Yes, nobody has ever had to recompile their application to work on a new kernel. If you mean that's nice that there's binary backwards compatibility, I agree. I don't see what this has to do with supporting multiple systems.

> Why do we have to set up multiple startup script mechanisms?

Why do we have to support multiple <insert any kind of software> ?

> We're moving more and more to having unified low-level services across Unices

AFAIK, the only thing I know of moving toward middleware unification specifically is Linux desktop software. Choosing to use systemd in exclusion of everything else is "unification" in the same way that nationalism/xenophobia/homophobia are. (i'm aware of how mean that sounds, but it's the closest comparison I can think of)

It is certainly nice that there is now middleware that abstracts the underlying software that controls the hardware, for example, or that authentication and authorization are more uncoupled. But this is really almost the opposite of what systemd does.

Re:A Thank-You Note to the Hacker News Community from Ubuntu by mgbmtl on Friday April 07, 2017 @02:30PM (#14062295)
Trivial example: Debian vs Ubuntu, when Ubuntu used upstart. Now I don't need to worry about process management anymore and can provide better Ubuntu support.

Although I'm speaking with my sysadmin hat (I have a few hats). I have a lot of software deployed/managed through Ansible (from node/ruby/python apps to proprietary apps). They might not provide a unit file, so I have to write my own (and I might send it upstream).

The main pain point I encountered regularly, was making sure that the process starts at the right time, has proper stderr logging and monitoring. I rarely bump into kernel or library problems (but that's just me, I'm not denying the problem). I understand what you mean though, systemd is just one of the base components. It doesn't fix everything, but it helps.

On "write once": I feel bad for people who have to read the shell scripts I've written. I think they're good and I'm a fan of keeping it simple, but my scripts don't come with a manual. Any junior dev can understand my unit files (tangential: that's also why I like Ansible/Puppet/etc).

Re:A Thank-You Note to the Hacker News Community from Ubuntu by collinmanderson on Friday April 07, 2017 @12:15PM (#14060949)
This exactly. I was quite happy when I learned about systemd and learned that it was coming in Ubuntu. I want a distro-agnostic easy way to keep programs running. init files were way too complicated, and upstart scripts were not distro-agnostic.

I didn't write upstart units for that reason. I now write systemd units and it's wonderful.

Re:A Thank-You Note to the Hacker News Community from Ubuntu by mintplant on Thursday April 06, 2017 @08:22PM (#14055968)
Messing with sysvinit scripts is just that painful.
Re:A Thank-You Note to the Hacker News Community from Ubuntu by tomc1985 on Thursday April 06, 2017 @09:31PM (#14056319)
I still don't understand how sysv scripts can be so long and hard-to-read for such a simple task.
Re:A Thank-You Note to the Hacker News Community from Ubuntu by milesrout on Thursday April 06, 2017 @05:38PM (#14054872)
systemd isn't a standard, it's a monoculture. There's a difference.
Re:A Thank-You Note to the Hacker News Community from Ubuntu by afarrell on Thursday April 06, 2017 @06:23PM (#14055228)
Id be interested to hear what the difference is.

By moniculture, are you saying that adopting systemd leaves you vulnerable to cross-distro vulnerabilities hitting a bunch of systems all at once? (Most of my knowledge on the downsides of monoculture come from Irish history) Or are you pointing to something else?

Re:A Thank-You Note to the Hacker News Community from Ubuntu by curun1r on Friday April 07, 2017 @12:33AM (#14057147)
A standard can have multiple implementations and changes happen by committee. A monoculture like systemd changes by the whim of their developers. If some implementation is too buggy, which by many accounts systemd is, being able to switch to/develop an alternative implementation without causing fragmentation is an important distinction.
Re:A Thank-You Note to the Hacker News Community from Ubuntu by peterwwillis on Thursday April 06, 2017 @06:49PM (#14055438)
It's a standard in the sense that Service Control Manager is a standard. But it's a monoculture in the sense that writing your application for Service Control Manager means it will only ever work on Windows NT-derived operating systems.

That's not a good standard for an operating system supposedly about flexibility, compatibility, and choice. And it's even more annoying for software which isn't intended to be run in a monoculture, like most of the open source/free software world.

Re:A Thank-You Note to the Hacker News Community from Ubuntu by roblabla on Thursday April 06, 2017 @07:26PM (#14055657)
To be fair, how hard can it be to port your app from one init system to the other ?

And for that matter, did anyone make a systemd-to-sysv converter ? Because that should surely be possible, systemd service files being declarative.

If such a converter did exist, then suddenly, the systemd "service files" could become an actual standard, since they'd be (somewhat) compatible accross sysv and systemd. And maybe we could work from there and support other init systems...

Re:A Thank-You Note to the Hacker News Community from Ubuntu by peterwwillis on Friday April 07, 2017 @01:13PM (#14061526)
Making a service file is only a small part of the systemd monoculture. People don't care about the init system as much as how it hijacks the entire OS and shuts out alternative Linux systems.

Your suggestion of turning systemd's APIs and formats into a standard is not out of the question, but it would never happen. Poettering and his team showed they have zero interest in making a compatible system, or in making any concessions at all. Standards have to do both. And other platforms have to buy into the standard, otherwise it just sits there like a third leg.

The way it would probably end up is a project like Alien would adopt some of systemd's quirks. But so much of systemd is tied directly into the application via APIs that it would be a huge PITA to support both systemd and anything else - hence why some devs simply drop support for anything that isn't systemd. It's the same sort of thing that causes devs to only develop for Windows, or iOS/OSX, because it's more popular and porting to Linux is too expensive.

Re:A Thank-You Note to the Hacker News Community from Ubuntu by roblabla on Saturday April 08, 2017 @08:10AM (#14066542)
Do you have an example of an app that is effectively locked into systemd ? I just don't see what systemd does that would lock apps in...
Re:A Thank-You Note to the Hacker News Community from Ubuntu by peterwwillis on Sunday April 09, 2017 @07:59PM (#14075010)
For one example, socket activation. To get the benefit of systemd (socket activation is supposedly the whole reason they supposedly created systemd) you have to patch your application to use the sd_* family of system calls. Old apps can be patched to support this, but new apps may not have any incentive to be built to use traditional sockets. So newer socket-communicating apps may not work at all on non-systemd systems.

Another is daemonization. In traditional systems, long-lived processes daemonized themselves and took care of themselves. The big benefit was independence and flexibility. You don't have to do a lot of work to port it, or maintain it, or administrate it. A shell script and some simple conventions allow it to run in almost any environment, and all of the services basically worked the same way. Often this was out of the necessity of a complex program's needs, where the way it manages its tasks, or shares memory, or communicates with other processes, or handles signals, or is checkpointed, or debugged, etc may have had complex requirements.

But now, systemd recommends you not daemonize your process. Let systemd manage it for you! This works great for very simple services, but not so well for complex ones. Now people are writing more services that can't manage themselves and thus need something like systemd to take care of it, or it simply won't work as a daemon on a non-systemd system.

The systemd people would say, any system can adopt these calls and these methods! (Which is equivalent to saying, any OS can adopt Linux's completly nonportable and specific syscalls, even though they already have a working alternative) But that's not the end of it. Every piece of systemd that you adopt, then depends on other piece of systemd, so you can't just pick up one piece of the pie. You have to eat the entire thing.

Re:A Thank-You Note to the Hacker News Community from Ubuntu by tie_ on Thursday April 06, 2017 @05:42PM (#14054902)
I don't believe people would have dropped Ubuntu (in general) for not using systemd (but I'd not bet on the word anyone). My point was that Ubuntu went with the fold even if people would not have dropped them for sticking to their own system.

The benefits of that unification are very, very tangible for package authors/maintainers - they now have to write just one flavor of a service file. And that is a great thing(tm) for the Linux community as a whole - well worth my own gripes with systemd itself.

Re:A Thank-You Note to the Hacker News Community from Ubuntu by vacri on Thursday April 06, 2017 @05:32PM (#14054826)
Systemd does more than init - it keeps popping up its head all over the place, such as for login or timekeeping. After all, it's 'systemd', not 'initd'...
Re:A Thank-You Note to the Hacker News Community from Ubuntu by qznc on Friday April 07, 2017 @03:44AM (#14057888)
Instead of "Linux", you say "GNU/systemd/Linux" from now on.
Re:A Thank-You Note to the Hacker News Community from Ubuntu by kuschku on Thursday April 06, 2017 @04:18PM (#14054206)
> FWIW, I too would like to keep the DE experience of Unity, and especially the Dash panel and shortcuts. If that expose-text-search could scan non-focused browser tabs that would be a killer feature, but that's for the other thread.

Maybe switch to KDE’s KRunner? It’s the most functional and extensive search framework yet.

Re:A Thank-You Note to the Hacker News Community from Ubuntu by tomc1985 on Thursday April 06, 2017 @09:31PM (#14056324)
Just curious as to how many of these replies have used systemd
Re:A Thank-You Note to the Hacker News Community from Ubuntu by Twirrim on Thursday April 06, 2017 @11:07PM (#14056778)
I would drop it in a heartbeat if I could. Dealing with servers it's not solving a problem I have, and just introducing the strangest behaviour along the way.
Re:A Thank-You Note to the Hacker News Community from Ubuntu by josteink on Friday April 07, 2017 @09:25AM (#14059374)
> Dealing with servers it's not solving a problem I have,

For me it's solving the problem of simply and reliably wiring up persistent and resilient services (not shipped with the OS).

I don't know about you, but that's a need I especially have on servers.

When systemd works, it works remarkably well.

Re:A Thank-You Note to the Hacker News Community from Ubuntu by Twirrim on Friday April 07, 2017 @02:06PM (#14062079)
>For me it's solving the problem of simply and reliably wiring up persistent and resilient services (not shipped with the OS).

That aspect was already largely solved, and has been for a long time. runit, upstart, daemontools etc.

Daemontools, like a number of djb's tools, manages to really manage to blend an amazing level of "just works" and "ZOMG, I configure this how?!"

Re:A Thank-You Note to the Hacker News Community from Ubuntu by tomc1985 on Friday April 07, 2017 @09:34PM (#14064744)
I always hated the prevalence of so many tools -- I get sick of having to learn 30 variants of the same stupid thing because none of them seem to excel in every area. One server from recent memory had crap running in sysv, inittab, and with deamontools because not everybody liked the same system and kinda just did what they knew. I'm rather happy that systemd throws all that out.
Re:A Thank-You Note to the Hacker News Community from Ubuntu by Twirrim on Saturday April 08, 2017 @01:01AM (#14065396)
That's just lousy technical culture. If you can't ensure you've got clean practices on your servers to that degree, you've got bigger problems on your plate.
Re:A Thank-You Note to the Hacker News Community from Ubuntu by tomc1985 on Saturday April 08, 2017 @02:03PM (#14068122)
As if one is always able to influence a lousy technical culture, especially if they just walked through the door...
Re:A Thank-You Note to the Hacker News Community from Ubuntu by tomc1985 on Friday April 07, 2017 @11:28AM (#14060488)
Indeed, I've deployed it in both embedded linux and server environments and it works quite nicely in both roles.
Re:A Thank-You Note to the Hacker News Community from Ubuntu by SteveNuts on Friday April 07, 2017 @12:34AM (#14057150)
Agreed, the config files for upstart were so easy to template out and always worked reliably.
Re:A Thank-You Note to the Hacker News Community from Ubuntu by dijit on Friday April 07, 2017 @07:27AM (#14058803)
I use it on my desktop and laptop today (Archlinux)

Have been using it since it was introduced in Fedora 16 (as I was a fedora guy) and I've never been convinced of its use on a server.

I understand it solves some problems but does so while introducing new and harder to remedy ones. (like tight ABI integration).

I don't mind systemd (ok, I'd criticise it but not nearly hate it as much), but I don't like that it's now the default target which forces me to use it in future.

I'm a Systems Engineer, so I have different needs from servers than Developers I guess, I want things to be easy to debug and diagnose.

I will say that I'm not only accustomed to systemd or sysvinit, I've also used runit at scale, along with SMF on Solaris and openrc.

SMF Beats the pants off systemd, even if it uses XML internally.

Re:A Thank-You Note to the Hacker News Community from Ubuntu by dustinkirkland on Thursday April 06, 2017 @04:24PM (#14054251)
Thank you!
Re:A Thank-You Note to the Hacker News Community from Ubuntu by yuhong on Thursday April 06, 2017 @04:32PM (#14054311)
I have a thread on when Pottering was hired at Red Hat:

https://news.ycombinator.com/item?id=14044287

I think there was a lot of hate for PulseAudio too.

I wonder what about Kay Sievers now, which was even hated by Linus Torvalds at one point.

Re:A Thank-You Note to the Hacker News Community from Ubuntu by AsyncAwait on Thursday April 06, 2017 @04:52PM (#14054488)
The 'haters' are the vocal minority. Lots of people I know, (myself included), actually prefer systemd as it greatly simplifies system management and writing of service files and is a lot more dynamic than upstart was. Maybe it's just my bubble, but systemd tends to be accepted as the right move now.

I am sure the people who hate it have good reasons, but all I've heard is 'doesn't follow UNIX philoshophy', (guess what, the whole Linux ecosystem doesn't really, even Stallamn isn't a fan), 'centralized', (somewhat valid, but there's still Gentoo and Void Linux), binary text files, (installing a 'text logger' over journalctl takes 5s and the filtering capabilities of journalctl are awesome).

Also, the hate for PulseAudio largely died years ago. I for one am glad for people like Pottering, who are willing to think longer term and produce great* software.

Yes, maybe more buggy at the start, (but not really the case with systemd), but great eventually. Also, let's be honest, the reason you see more bugs in i.e. PulseAudio is because it is being developed in the open from its inception.

Re:A Thank-You Note to the Hacker News Community from Ubuntu by tie_ on Thursday April 06, 2017 @05:30PM (#14054818)
I don't like systemd for a bit more practical reasons.

For example, how do you like the fact that init now comes with "hidden" timers ? After you've scoured every place that a "traditional" Linux might put scheduled tasks, you've come to the realization "Ooooh, now my init has its own cron!". Because obviously an init system needs its own cron!

Or the subtle way it breaks existing SysV compatibility. An RPM/Deb package drops its SysV init file at /etc/init.d, and the next thing your ConfigManagement system does is try to start the service - quite standard. Bang - "Unit not found"! Why? Now on systemd-enabled flavors, you need to reload the mofo after dropping in your files. Of course Systemd could hook into dbus and run crons, but it can't be bothered to inotify or even jit-check-upon-request /etc/init.d. Because subtle breakages are cool!

How about the systemd-hostnamed service? Why on earth would we need a service to change the hostname? And why should it care about the "chasis type" of the machine?

These are just some of my own WTFs encountered during my admittedly short but language-colorful interaction with systemd. I have nothing against the Systemd unit files, but the functionality/bug scope of the whole thing is way bigger than I'd feel comfortable with!

P.S. Poettering is reportedly a townie, so I'd love to buy him a beer someday and berate him over it.

Re:A Thank-You Note to the Hacker News Community from Ubuntu by AsyncAwait on Thursday April 06, 2017 @05:47PM (#14054957)
> For example, how do you like the fact that init now comes with "hidden" timers ? After you've scoured every place that a "traditional" Linux might put scheduled tasks, you've come to the realization "Ooooh, now my init has its own cron!"

They're not "hidden", just managed with systemctl like other services, you can still use regular cron if you'd like.

As to the rationale of including timers, it is for stuff like mounting and unmounting remote disks etc, at boot, which I personally would include under the responsibilites of a modern init system and 'system manager' in general, same with taking care of TRIM every so often etc., but I appreciate that it isn't for everyone.

> Or the subtle way it breaks existing SysV compatibility.

The SysV init scripts would regurarly break in subtle ways by themselves to be honest, I find systemd a much saner option.

> How about the systemd-hostnamed service? Why on earth would we need a service to change the hostname? And why should it care about the "chasis type" of the machine?

The systemd network stack is entirely optional and intended for scenario where you can't afford/don't need the 'fatness' of NetworkManager, just because it's there, doesn't mean you have to use it.

> P.S. berate him over it.

Plenty of people already did so, over and over, but have fun, considering you'd be buying him a beer...

Re:A Thank-You Note to the Hacker News Community from Ubuntu by tie_ on Friday April 07, 2017 @02:35PM (#14062335)
> They're not "hidden", just managed with systemctl like other services.

So far in the history of nix, services have never equaled periodic tasks, to my knowledge. In that sense, it's a hidden surprise that would sooner or later bite everybody that has not been initiated in systemd. It makes things harder to debug.

> As to the rationale of including timers, it is for stuff like mounting and unmounting remote disks etc, at boot

Now do you go from that need to "and that requires an internal crond implementation in your init system". Why not atd, or regular cron, or sleeping processes? I'm genuinely curious, so if you're aware of public discussion of it, please point me in that direction.

> The SysV init scripts would regurarly break in subtle ways by themselves to be honest, I find systemd a much saner option.

I appreciate that the chaining and dependencies of SysV init were horrible. That doesn't make it OK for systemd to introduce more subtle breakages in even a very basic* usecase.

> The systemd network stack is entirely optional and intended for scenario where you can't afford/don't need the 'fatness' of NetworkManager

In the scenario where you do not need NetworkManager/GUI hostnamed would be quite worthless as well. /etc/hostname and the `hostname` command are more than enough to handle that case, thank you.

I guess my main issue with systemd is that it introduces (mostly?) unnecessary complexity, which makes me waste more time debugging problems. Of course it is better than SysV init, and I'm very happy with the syntax of system files. Yet, upstart showed that you can have those niceties without an excess of complexity.

Re:A Thank-You Note to the Hacker News Community from Ubuntu by mdekkers on Friday April 07, 2017 @11:52AM (#14060697)
As to the rationale of including timers, it is for stuff like mounting and unmounting remote disks etc

The implementation is retarded. Last week my providers' iSCSI fabric suffered a glitch, which hosed a whole bunch of servers for hours because systemd refused to boot when it found the volumes not present. These were in no way critical to the operation of the stack. However, some moron somewhere decided that locking the system for 5 minutes on boot, and then simply refusing to boot properly, when everything required to boot is actually in place and OK is the correct course of action. I have enough of that kind of deranged thinking to deal with coming from Windows, I don't need it from my Linux machines.

Systemd sucks for servers. It might do a lot of nice fancy tech stuff, but it is extremely poorly thought out for use on the server.

Re:A Thank-You Note to the Hacker News Community from Ubuntu by AsyncAwait on Friday April 07, 2017 @12:22PM (#14061019)
> systemd refused to boot when it found the volumes not present

This is not normal systemd behaviour, it waits for the resource, but only 1min 30s by default and then continues booting, (unless the services are considered critical for reaching certain target), logging a failed service, someone must have therefore explicitly configured a custom behaviour in your situation.

> The implementation is retarded.

May be, or may be whoever configured the server this way is, who knows?

> I have enough of that kind of deranged thinking to deal with coming from Windows

As I said above, this is not standard systemd behaviour.

I am not saying that systemd is perfect, but your case seems like misconfiguration, rather than "deranged thinking" from the systemd devs.

I'l encarouge you to read more on its configuration, it's actually fairly flexible, this[1] is a solid starting point.

1 - https://wiki.archlinux.org/index.php/systemd

Re:A Thank-You Note to the Hacker News Community from Ubuntu by kasabali on Wednesday April 19, 2017 @05:35AM (#14146546)
Bailing out and dropping to the rescue shell when a mount point in /etc/fstab failed is DEFINITELY the normal systemd behavior.One has to mark it as nofail otherwise systemd will assume it is required for boring the system.

(this was originally meant as a reply to above comment was mistakenly posted to grandparent.)

Re:A Thank-You Note to the Hacker News Community from Ubuntu by mdekkers on Friday April 07, 2017 @02:12PM (#14062136)
Standard Ubuntu 16.04. From my reading, it waits 90 seconds, then some more, and then even more.
Re:A Thank-You Note to the Hacker News Community from Ubuntu by AsyncAwait on Friday April 07, 2017 @02:34PM (#14062330)
Not the case on Arch, but you can customize timeout anyway[1], using TimeoutSec, TimeoutStartSec and TimeoutStoptSec, or even the global setting[2].

1 - https://www.freedesktop.org/software/systemd/man/systemd.ser...

2 - http://stackoverflow.com/questions/33776937/how-to-change-th...

Re:A Thank-You Note to the Hacker News Community from Ubuntu by kasabali on Friday April 07, 2017 @04:05PM (#14063091)
Bailing out and dropping to the rescue shell when a mount point in /etc/fstab failed is FOR SURE the standard systemd behavior.One has to mark it as nofail otherwise systemd will assume it is required for boring the system.
Re:A Thank-You Note to the Hacker News Community from Ubuntu by interestingemu on Friday April 07, 2017 @07:36AM (#14058838)
> The systemd network stack is entirely optional and intended for scenario where you can't afford/don't need the 'fatness' of NetworkManager, just because it's there, doesn't mean you have to use it.

Currently.

Re:A Thank-You Note to the Hacker News Community from Ubuntu by tetromino_ on Thursday April 06, 2017 @06:46PM (#14055415)
> How about the systemd-hostnamed service? Why on earth would we need a service to change the hostname?

If you want the hostname to be preserved across reboots, you need to save it on disk - canonically, in the /etc/hostname config file.

Since /etc/hostname is an important per-machine config file, you probably want it owned by root.

Since you may want to edit this config file from a GUI control panel of some sort that you launch from a desktop environment running under a non-root user, you need a mechanism for the control panel process to be able to change the config file.

There are several ways to accomplish this:

* run the control panel process under root (for example, using sudo). This is not a good idea, especially under X11, since GUI toolkit libraries are not security hardened, have a large attack surface thanks to various GUI IPC mechanisms, and your control panel process could be subverted by hostile processes that have been waiting in the background for just such an occasion to arise.

* put your non-root user in a group which has write access to /etc/hostname. This is the traditional Unix solution, but it's not very flexible. If your user was not in the hostname-writer group, you will have to log out and back in for the change to take effect. And you can't create policies like requiring entering a password before performing administrative-type actions (unless the password is for sudo - and that is dangerous, see above).

* run a daemon under root that allows making edits to /etc/hostname. Provide an IPC interface to request a change to /etc/hostname; have the daemon check, via a call to a flexible, configurable authorization service, that the caller process has the right to perform a "change /etc/hostname" action (the authorization service might reply yes if, for example, the caller's user belongs to a specific group and verified his password within the last N minutes); and only then make the change on behalf of the unprivileged caller.

The latter seems like a better solution. Maybe over-engineered for managing a one-line config file, but definitely the solution to go with for more complex situations; so we might as well use the general solution in this case too.

The daemon is hostnamed; the flexible authorization service is polkit. See https://www.freedesktop.org/wiki/Software/systemd/hostnamed/ for more details.

Re:A Thank-You Note to the Hacker News Community from Ubuntu by wruza on Friday April 07, 2017 @05:52AM (#14058430)
Honestly, all these points make me feel sick from an architecture point of view. Why cannot groups be applied to the user instantly? Why doesn't system have regular ways to change 'registry' values (sorry for analogy, but /etc is a standard-defined setting storage; I'm a unix guy, ftr). If the kernel team has good arguments against that, why hostnamed is not named privilege-d and not using some system bus to change anything beyond hostname? Is hostname the only thing with such problem, the only gui-configurable system-wide setting?

While being a formally valid solution, it all seems like waste of simplicity and totally uncontrolled design process.

Re:A Thank-You Note to the Hacker News Community from Ubuntu by tetromino_ on Friday April 07, 2017 @09:51AM (#14059596)
> Why cannot groups be applied to the user instantly?

Good question! I've wondered about this before too, ought to research it.

> Is hostname the only thing with such problem, the only gui-configurable system-wide setting?

Of course not :) Systemd provides a half-dozen similar daemons for configuring things; hostnamed is probably the simplest one of them, so I was trying to justify why so much engineering went into something that looks so trivial: it's because the approach is generic.

The idea is that a non-systemd system could reimplement some of these daemons (or rather, their dbus interface; you could implement them in one executable if you want) - and the parts of a standard control panel application relevant to your system would just work.

Re:A Thank-You Note to the Hacker News Community from Ubuntu by supergreg on Thursday April 06, 2017 @08:49PM (#14056121)
Wait, since when is sudo considered dangerous? Forget the GUI for editing the hostname file, we have much more important things to worry about if that's the case.
Re:A Thank-You Note to the Hacker News Community from Ubuntu by simcop2387 on Thursday April 06, 2017 @09:10PM (#14056225)
He's not saying that sudo is dangerous but that a GUI program running in X11 as root is dangerous. This is because most GUI toolkits aren't hardened against attackes (buffer overflows, badly formed events, etc.) that can all be sent as a non-privileged user/program under X11 to one that's running as root. This means that if someone had an exploit in your browser that let them see X11 events or send them to another window then they could potentially use that to gain root access the moment you went into ANYTHING that ran as root under you X session.
Re:A Thank-You Note to the Hacker News Community from Ubuntu by tetromino_ on Friday April 07, 2017 @10:04AM (#14059688)
Yes, exactly. I should have been more clear.

"sudo vim /etc/whatever.conf" is perfectly fine.

"sudo gedit /etc/whatever.conf" might give an attacker already on your system a way to gain root.

Re:A Thank-You Note to the Hacker News Community from Ubuntu by supergreg on Thursday April 06, 2017 @09:13PM (#14056240)
Then why use a GUI to edit the hostname in the first place? Either use sudo or fix the security issues with Xorg.
Re:A Thank-You Note to the Hacker News Community from Ubuntu by btschaegg on Friday April 07, 2017 @03:43AM (#14057877)
> Either use sudo

Yes, just keep doing that. I run several Linux boxes with systemd, all of them without hostnamed.

Forcing all your users to use the One True Way on a complicated system usually just means you're ignoring many legitimate use cases. Microsoft still does that on Windows (APIs and ugly registry entries over everything) - and while I cringe everytime I see it, I still recognize that the approach has value for some situations.

Many of the daemons for systemd on the other hand are optional, which I personally find to be great. I can use the ones I need and leave the ones I don't.

As for the GUI: Why use a text file? That might be a good use case for you and me, but a terrible one for someone not used to administrate *NIX systems. Why not allow both? As long as the file-based approach is not neglected, I'm perfectly fine with that.

Re:A Thank-You Note to the Hacker News Community from Ubuntu by qznc on Friday April 07, 2017 @03:39AM (#14057860)
If you tell users to edit the file, they will do something stupid like using LibreOffice. Ubuntu wants to be useable without using a terminal.
Re:A Thank-You Note to the Hacker News Community from Ubuntu by kazinator on Friday April 07, 2017 @01:38AM (#14057404)
Device drivers have timers.
Re:A Thank-You Note to the Hacker News Community from Ubuntu by wpietri on Thursday April 06, 2017 @08:11PM (#14055906)
> Yes, maybe more buggy at the start, (but not really the case with systemd), but great eventually.

This kind of excuse-making makes me rabid. "We will use our position of power to drag everybody through debugging our poorly made software because we are amazing and one day it will be great" is not a position I will ever have much respect for.

If somebody's enough of a genius to see the future of software, they're enough of a genius to make their shit work for the audiences they are currently shipping to.

Re:A Thank-You Note to the Hacker News Community from Ubuntu by stevekemp on Friday April 07, 2017 @05:18AM (#14058313)
Philosophically I dislike the idea of systemd, primarily because it seems to be growing more and more. (Gaining the ability to launch machines, run DNS, etc)

But practically? The service-files are a pleasure to write, the documentation is excellent, and I've not personally had a failure I could attribute to systemd. (Though I did come close, learning that systems with an old version of "snoopy" installed wouldn't boot under systemd.)

Re:A Thank-You Note to the Hacker News Community from Ubuntu by yarrel on Thursday April 06, 2017 @05:13PM (#14054681)
If it takes "five seconds" to fix the presentation (but not the implementation) of SystemD's log files then there's no reason why people who do not understand SystemD's deficiencies shouldn't be able to spend the same amount of time Googling for one of the many clearly written accounts of them.

And I know a lot of musicians who still find PulseAudio not fit for purpose. There's no hate, just frustration at the adoption of a bad solution crowding out ones that work better for their given use case.

Re:A Thank-You Note to the Hacker News Community from Ubuntu by stinkytaco on Thursday April 06, 2017 @05:28PM (#14054801)
Why should I spend 5 minutes googling for negative accounts of something I like? I honestly find systemd quite easy to work with. Untangling a maze of init scripts when a package maintainer wasn't being careful or someone made a mistake was miserable. Now startup is more more standardized, in my opinion. I don't like it as well as upstart, but I see no reason to go digging for problems. When I encounter one, I'll do it then.
Re:A Thank-You Note to the Hacker News Community from Ubuntu by supergreg on Thursday April 06, 2017 @09:17PM (#14056256)
> I see no reason to go digging for problems. When I encounter one, I'll do it then.

It was the same with init, but instead of digging into greppable script files, you need to dig into Google and systemd manpages first, then dig into the actual issues second.

Re:A Thank-You Note to the Hacker News Community from Ubuntu by cookiecaper on Thursday April 06, 2017 @05:59PM (#14055054)
PulseAudio may not serve every use case (and what does?), but it's been an absolute godsend for anyone who remembers the bad old days of Linux sound. Musicians, a small minority of users, can still install JACK to accommodate their needs.
Re:A Thank-You Note to the Hacker News Community from Ubuntu by jononor on Saturday April 08, 2017 @06:13AM (#14066241)
Yes, PulseAudio explicitly does not aim to offer low-latency for real-time audio. Need to use JACK for that.

PulseAudio actually implemented a Dbus API to release its lock on the AlSA device. jack2 can use this automatically take over when it starts. There also exists two-way sound transport for sending sound from Pulse to JACK. If that was automatically set up also, then we would have a plug & play solution for pro/real-time audio on Linux.

Re:A Thank-You Note to the Hacker News Community from Ubuntu by AsyncAwait on Thursday April 06, 2017 @05:20PM (#14054741)
> there's no reason why people who do not understand SystemD's deficiencies shouldn't be able to spend the same amount of time Googling for one of the many clearly written accounts of them.

I listed the ones I could find and stated why I disagree with them, you could've made this a useful post by listing some additional ones, but instead you choose to just spell, (miscase?), systemd wrong.

Re:A Thank-You Note to the Hacker News Community from Ubuntu by lettergram on Thursday April 06, 2017 @05:01PM (#14054564)
Personally, I wish the Linux community went with ZFS. IMO it's still better than systemD as systemD still doesn't have a solid disk backup system...

https://wiki.archlinux.org/index.php/ZFS

Re:A Thank-You Note to the Hacker News Community from Ubuntu by walterbell on Thursday April 06, 2017 @05:10PM (#14054658)
How is ZFS related to system initialization?
Re:A Thank-You Note to the Hacker News Community from Ubuntu by AsyncAwait on Thursday April 06, 2017 @05:18PM (#14054722)
It's a shot at how systemd supposedly includes everything, I believe...
Re:A Thank-You Note to the Hacker News Community from Ubuntu by Twirrim on Thursday April 06, 2017 @11:15PM (#14056818)
It can't, due to licensing incompatibility.

ZFS is not compatible with the GPL. Canonical is treading a risky path with what they're doing.

I would love ZFS to be native on Linux, BTFS has had too many scary data loss bugs to be able to trust it.