meta data for this page
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| linux:lxc:issues:unified_cgroups [2021/04/25 12:06] – created niziak | linux:lxc:issues:unified_cgroups [2021/04/25 20:14] (current) – niziak | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| Problem introduced with change from systemd 241 to 247. | Problem introduced with change from systemd 241 to 247. | ||
| Main change is to drop CGroup V1 support and switch by default to '' | Main change is to drop CGroup V1 support and switch by default to '' | ||
| + | * Previous v241 was built with '' | ||
| + | * Current v247 is built with '' | ||
| + | <code bash> | ||
| + | $ systemctl --version | ||
| + | systemd 247 (247.3-1~bpo10+1) | ||
| + | +PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +ZSTD +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=unified | ||
| + | </ | ||
| Lots of issues are reported, and lots of containerization software needs to be upgraded: | Lots of issues are reported, and lots of containerization software needs to be upgraded: | ||
| - | * docker | + | * Docker |
| * kubernetes | * kubernetes | ||
| - | * lxcs | + | * LXC |
| + | * libpam_cgfs cannot be used with pure '' | ||
| + | |||
| + | Resources: | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| ===== Workaround ===== | ===== Workaround ===== | ||
| - | '' | + | ==== Switch systemd to hybrid hierarchy ==== |
| + | |||
| + | Add kernel boot commandline argument: | ||
| + | |||
| + | <code bash> | ||
| + | echo ' | ||
| + | </ | ||
| + | |||
| + | More info: | ||
| + | * **systemd.unified_cgroup_hierarchy** | ||
| + | * When specified without an argument or with a true argument, enables the usage of unified cgroup hierarchy (a.k.a. cgroups-v2). When specified with a false argument, fall back to hybrid or full legacy cgroup hierarchy. If this option is not specified, the default behaviour is determined during compilation (the -Ddefault-hierarchy= meson option). If the kernel does not support unified cgroup hierarchy, the legacy hierarchy will be used even if this option is specified. | ||
| + | |||
| + | ==== Delegate a cgroup in advance ==== | ||
| + | |||
| + | From: [[https:// | ||
| + | |||
| + | Running unprivileged containers as an unprivileged user only works if you delegate a cgroup in advance (the cgroup2 delegation model enforces this restriction, | ||
| + | |||
| + | <code bash> | ||
| + | systemd-run --unit=myshell --user --scope -p " | ||
| + | </ | ||