Skip to content
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

nixos/lxd: disable cgroup v2 when LXD is active #108380

Merged
merged 1 commit into from Jan 7, 2021

Conversation

Patryk27
Copy link
Member

@Patryk27 Patryk27 commented Jan 4, 2021

c768913 changed systemd to use cgroup v2 by default, which kinda-sorta broke lxd, as its support for unified hierarchy is rather poor - e.g. setting CPU limits doesn't work and I've had some issues with nested systemd instances.

Our test for LXD - nixos/tests/lxd.nix - would've caught this (as it currently fails on master), but TBH I'm not sure why it wasn't ran :/

@Patryk27 Patryk27 changed the title nixos/lxd: Disable cgroup v2 when LXD is active nixos/lxd: disable cgroup v2 when LXD is active Jan 4, 2021
@@ -100,6 +100,10 @@ in
packages = [ cfg.lxcPackage ];
};

# TODO: remove once LXD gets proper support for cgroupsv2
# (currently most of the e.g. CPU accounting stuff doesn't work)
systemd.enableUnifiedCgroupHierarchy = false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any upstream issue to mention here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, I haven't been able to find any tracking issue - though I've found e.g. https://github.com/lxc/lxd/pull/8146, which suggests that CPU accounting should work - I guess it'll all be deployed with the next LXD's version.

@SuperSandro2000 SuperSandro2000 merged commit 58514b3 into NixOS:master Jan 7, 2021
@Patryk27 Patryk27 deleted the fixes/lxd-cgroup-v2 branch January 8, 2021 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants