News for hackers. Stuff that matters.
Re:Docker isn't perfect – Issue #216 by jkyle on Thursday August 27, 2015 @05:24PM (#10132208)
> I think that RedHat IS at fault in this, because their design choice of designating systemd as the single writer was extremely anti-standardization. Imagine if KDE wanted to be the single cgroup writter.

This isn't a very good analogy.

> I think that RedHat IS at fault in this, because their design choice of designating systemd as the single writer was extremely anti-standardization.

This doesn't make sense. When the changes hits the kernel, all OS maintainers will need to choose a parent process for all cgroup control. Supporting this feature in systemd makes perfect sense and fits very well in the process hierarchy.

> Would people accept the fact that they would have to use KDE and interface with KDE in order to do containers on Linux?

Users and distributions who do not want to use systemd (their choice!) can use any other init system they want. They are also free to implement any other solution as their cgroup controller. Their situation is not changed one iota by this additional feature in systemd. They would have had to implement a cgroup controller either way.

In short, you are not required to use systemd if they make this choice. You may not have the benefit of someone else implementing the solution for you. But unless you're paying developers for the work, the guarantee of others doing work for you in the way you want them to is never provided.

> RedHat could have created a service "cgroupwriter" which would have communicated via D-bus or something.

They could have, but it would have added needless complexity. A significant number of tasks systemd needs to perform includes dependencies between cgroups. So mine as well manage it in the init system.

This isn't like a hard dependency on systemd. It just means that someone will need to author other solutions if systemd is not wanted.

Re:Docker isn't perfect – Issue #216 by timthelion on Thursday August 27, 2015 @06:34PM (#10132595)
> Users and distributions who do not want to use systemd (their choice!) can use any other init system they want. They are also free to implement any other solution as their cgroup controller. Their situation is not changed one iota by this additional feature in systemd. They would have had to implement a cgroup controller either way.

The trouble is, that Docker doesn't get to choose what cgroup controller "everyone" will use, it has to support them all. And the idea of interfacing with systemd on cgroups wasn't very appatizing because it was guaranteed to lead to Docker needing special compat code for whatever non-systemd version of cgroups control came out. While I agree with @cwyers that kicking the RedHat folks out doesn't help, it certainly felt to me like that particular discussion could have been phrased differently so that no conflict was created. For example, if the RedHat folks have said that there is going to be a single writer policy and systemd is a cgroup writer on systemd systems, that would have been far less combative than saying "and systemd is that writer". I know that the distinction is subtle, I'm not sure if I should try to find the origional thread. It was written as comments on diffs in a pull request. It would be therefore rather hard to find, and also I feel a little bad about pulling out exact names of the people involved because I think that the actual people working for RedHat are fine people who I don't want to attack and that this is somehow a problem of RedHat corporate policy and not bad apples.

Re:Docker isn't perfect – Issue #216 by jkyle on Thursday August 27, 2015 @06:57PM (#10132674)
I'm still not seeing the logic in your rationale.

> The trouble is, that Docker doesn't get to choose what cgroup controller "everyone" will use, it has to support them all.

Yes, this is an unfortunate consequence of the new kernel changes. Docker will need to interact with a controller. That controller might be different on different systems. Ergo, if Docker wants to support those systems it needs to support multiple controllers.

> And the idea of interfacing with systemd on cgroups wasn't very appatizing because it was guaranteed to lead to Docker needing special compat code for whatever non-systemd version of cgroups control came out.

Yes. But this would be the case no matter what controller was chosen for a particular distribution. For example, if Red Hat decided to implement a controller called Skunk one could say

> And the idea of interfacing with skunk on cgroups wasn't very appatizing because it was guaranteed to lead to Docker needing special compat code for whatever non-skunk version of cgroups control came out.

Same situation. No matter how you slice it, Docker now needs to support compatibility code for interacting with cgroups on systems it wants to support.

> I know that the distinction is subtle

It seems pretty meaningless. It's beginning to feel like the opposition, as described here, had little to do with anything technical or even design oriented and is more religious in nature.

Would the same opposition have been made against my hypothetical skunk controller? If not, seems more like an editor war than a design or engineering disagreement.

Re:Docker isn't perfect – Issue #216 by cwyers on Thursday August 27, 2015 @08:32PM (#10133017)
> And the idea of interfacing with systemd on cgroups wasn't very appatizing because it was guaranteed to lead to Docker needing special compat code for whatever non-systemd version of cgroups control came out.

Unless Docker is planning to move to running on BSD jails or fork the kernel, they have to do this no matter how unappetizing they find it, once the kernel moves to single writers on cgroups.

Re:Docker isn't perfect – Issue #216 by mkw39ekdm on Friday August 28, 2015 @03:11AM (#10134079)
FreeBSD is working on Docker support: https://wiki.freebsd.org/Docker
Re:Docker isn't perfect – Issue #216 by fatherlinnux on Sunday August 30, 2015 @02:22PM (#10144089)
Have fun with that. The Linux User Space will not work on a BSD kernel, so you would be forced into a BSD user space.

Now you are back at Square Zero. There is nothing wrong with the BSD, but it's just another different thing to learn and work with. I am skeptical this is the right way of looking at the problem.

Bottom line, the Linux Kernel changed, so Docker has to deal with it.

Re:Docker isn't perfect – Issue #216 by ibotty on Tuesday September 01, 2015 @03:41AM (#10151185)
> The Linux User Space will not work on a BSD kernel

That's wrong, more or less. Read about Linux emulation on BSDs. Of course some low-level utilities won't work, but most of userspace does.

Re:Docker isn't perfect – Issue #216 by cwyers on Thursday August 27, 2015 @05:48PM (#10132348)
Or put another way. The kernel is deprecating multi-writer support for cgroups at some point in the future. systemd has announced they will provide an API for cgroups, where systemd serves as the single writer. On systems not using systemd, some other service will have to serve as the single writer for cgroups. They may or may not implement the same API. (I don't know that anyone has announced plans for an alternative to systemd's cgroups API.) Once this changeover happens, systemd's API will be the only way to use cgroups on systemd systems. This isn't portable, but that's not a problem with Red Hat's contributions to Docker, it's an issue with systemd. Kicking RHEL's contributors to Docker out doesn't actually solve this problem.
Re:Docker isn't perfect – Issue #216 by jkyle on Thursday August 27, 2015 @05:57PM (#10132408)
> it's an issue with systemd

I wouldn't even say this is an issue with systemd. It just happens that systemd (or logind actually) is what was selected as the cgroup controller on distributions that use it.

Mostly, it's an issue with Docker (and all other cgroup clients) that are currently using their own controllers.

It doesn't matter one bit what the distributions chose as their new controller, the existing clients would need to adapt to the new environment.

If anything, having systemd handle this has simplified their jobs significantly since they can support a huge swath of distributions capturing the overwhelming majority of user's systems by targeting a single API.