openwrt / openwrt/packages

lxc-auto: don't mount legacy cgroups

Open
#25,424 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Makefile
Stars
4.6k
Forks
4k
Avg merge
3d 12h
Merged PRs (30d)
134

Description

Maintainer: ?
Environment: snapshot

Description:

lxc-auto.init mounts legacy cgroups at /sys/fs/cgroup/systemd.

https://github.com/openwrt/packages/blob/openwrt-22.03/utils/lxc/files/lxc-auto.init#L65-L73

In my experience current lxc containers cannot be booted with cgroupv2 mounted in the guest when there are cgroupv1 mounts. I have messed around with this endlessly and I found that the only way to properly allow the guest to mount cgroups is to not have any legacy ones mounted on the host.

So I think it is safe to not have lxc-auto have this mount.

See also the discussion at https://github.com/openwrt/packages/issues/22586

I am willing to create a PR for this.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with utils/lxc/files/lxc-auto.init, especially lines 65-73, and read the linked discussion in issue 22586 for context. Remove the legacy cgroup mount and verify that current LXC containers can boot and mount cgroupv2 without host cgroupv1 mounts.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, shell
Domain
operating-systems
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.