systemd-nspawn uses cgroupv1

Bug #2073625 reported by Josh Santos
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
New
Undecided
Unassigned

Bug Description

Even though Ubuntu 22.04 is definitely using cgroup2:
cgroup2 on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)

systemd appears to be using cgroup:

cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/rdma type cgroup (rw,nosuid,nodev,noexec,relatime,rdma)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/misc type cgroup (rw,nosuid,nodev,noexec,relatime,misc)

When starting a container using default configuration from `systemd-nspawn@` unit it automatically selects cgroupv1 for some reason:

 <email address hidden> - Container debian-sid
     Loaded: loaded (/lib/systemd/system/systemd-nspawn@.service; disabled; vendor preset: enabled)
     Active: active (running) since Sat 2024-07-20 00:48:30 +07; 1s ago
       Docs: man:systemd-nspawn(1)
   Main PID: 5210 (systemd-nspawn)
     Status: "Container running."
      Tasks: 2 (limit: 16384)
     Memory: 2.7M
     CGroup: /<email address hidden>
             ├─payload
             │ └─5214 /usr/lib/systemd/systemd
             └─supervisor
               └─5210 systemd-nspawn --quiet --keep-unit --boot --link-journal=try-guest --network-veth -U --settings=override --ma>

ก.ค. 20 00:48:30 ubuntu-dev systemd[1]: Starting Container debian-sid...
ก.ค. 20 00:48:30 ubuntu-dev systemd[1]: Started Container debian-sid.
ก.ค. 20 00:48:30 ubuntu-dev systemd-nspawn[5210]: Legacy cgroup v1 support selected. This is no longer supported ...

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: systemd-container 249.11-0ubuntu3.12
ProcVersionSignature: Ubuntu 6.5.0-44.44~22.04.1-generic 6.5.13
Uname: Linux 6.5.0-44-generic x86_64
ApportVersion: 2.20.11-0ubuntu82.5
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Sat Jul 20 00:43:45 2024
InstallationDate: Installed on 2024-07-19 (0 days ago)
InstallationMedia: Ubuntu 22.04.4 LTS "Jammy Jellyfish" - Release amd64 (20240220)
SourcePackage: systemd
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Josh Santos (joshomnidapps) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.