summaryrefslogtreecommitdiff
path: root/gnu/system
diff options
context:
space:
mode:
authorSam Lockart <sam@samlockart.com>2023-06-24 03:11:26 +0000
committerLudovic Courtès <ludo@gnu.org>2023-08-08 18:01:55 +0200
commit969cea683615e79c7e6548f945f15af80ad58a8a (patch)
tree025fb4b57939e1dd7239ce1474333012aaa32ef1 /gnu/system
parent267e4234ff05076a67bd7fd0e7c8ddf8b6690352 (diff)
file-systems: Use cgroups v2.
cgroup v2 is the next generation of the control groups API. This patch replaces the cgroup v1 file systems with the unified cgroup v2 file system. cgroup v2 allows for things like containerd/podman to run rootless containers and opens guix system up to running things like Kubernetes. Thanks to Hilton Chain <hako@ultrarare.space> for suggesting the Docker service change. * gnu/system/file-systems.scm (%control-groups): Change to a single "cgroup2" mount point. * gnu/services/docker.scm (docker-shepherd-service): Trim 'requirement' field accordingly. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/system')
-rw-r--r--gnu/system/file-systems.scm27
1 files changed, 7 insertions, 20 deletions
diff --git a/gnu/system/file-systems.scm b/gnu/system/file-systems.scm
index 0ff5a0dcf6..95b757a698 100644
--- a/gnu/system/file-systems.scm
+++ b/gnu/system/file-systems.scm
@@ -445,26 +445,13 @@ TARGET in the other system."
(flags '(read-only bind-mount no-atime))))
(define %control-groups
- (let ((parent (file-system
- (device "cgroup")
- (mount-point "/sys/fs/cgroup")
- (type "tmpfs")
- (check? #f))))
- (cons parent
- (map (lambda (subsystem)
- (file-system
- (device "cgroup")
- (mount-point (string-append "/sys/fs/cgroup/" subsystem))
- (type "cgroup")
- (check? #f)
- (options subsystem)
- (create-mount-point? #t)
-
- ;; This must be mounted after, and unmounted before the
- ;; parent directory.
- (dependencies (list parent))))
- '("cpuset" "cpu" "cpuacct" "memory" "devices" "freezer"
- "blkio" "perf_event" "pids")))))
+ ;; The cgroup2 file system.
+ (list (file-system
+ (device "none")
+ (mount-point "/sys/fs/cgroup")
+ (type "cgroup2")
+ (check? #f)
+ (create-mount-point? #f))))
(define %elogind-file-systems
;; We don't use systemd, but these file systems are needed for elogind,