-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support unified cgroup hierarchy #54
Comments
What's the current state of support for unified cgroup hierarchy? I know my current WSL2 kernel still defaults to hybrid mode, and I'd assume other distros do the same. Can we reasonably support both? |
On Wed, Apr 28 2021, Matej Kafka wrote:
What's the current state of support for unified cgroup hierarchy?
Fedora seems to started using it more than a year ago
(https://medium.com/nttlabs/cgroup-v2-596d035be4d7). I don't have exact
picture about other distros, but I see various gossip that they are
switching as well. As far as I know, one big blocker for switching was
Docker, but it now supports unified hierarchy as well.
I know my current WSL2 kernel still defaults to hybrid mode, and I'd
assume other distros do the same. Can we reasonably support both?
I think, it's not a big deal. We just need to configure root paths for
different cgroup controllers to be the same. But I may be wrong :)
I think it should be straightforward to create a NixOS VMs with hybrid
and unified hierarchy so that we can test (even on github) that both
versions work. I'll try to prepare this later.
|
Now, when #55 is closed, we can start developing support for unified cgroup hierarchy. The example below shows how to test it and what currently fails (even the simplest command). [host:~]# cd demos-sched/test
[host:~/demos-sched/test]# nix-shell -p nixos-shell --command nixos-shell
...
<<< Welcome to NixOS 21.11.git.1e6fe5276cdM (x86_64) - ttyS0 >>>
Log in as "root" with an empty password.
nixos login: root
[root@nixos:~/demos-sched/test]# demos-sched -C '{windows: [], partitions: []}'
>>> 14:55:13.197 [critical] Assertion failed: `!freezer_path.empty()`
>>> 14:55:13.199 [critical] at ../src/cgroup_setup.cpp:76 (bool cgroup_setup::create_toplevel_cgroups(Cgroup&, Cgroup&, Cgroup&, const string&))
>>> 14:55:13.201 [critical] Unwinding stack and exiting...
>>> 14:55:13.202 [error] Exception: Assertion failed (see above) |
Github actions's |
Currently, when demos runs on a system using unified cgroup hierarchy, it fails, because the layout of cgroup filesystems is different than what is expected. Demos should detect this situation (see #27) and configure/create cgroups accordingly. Issue #31 is also related to this problem.
The text was updated successfully, but these errors were encountered: