mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-18 13:36:36 +01:00
services: rootless-podman: Enable I/O delegation.
Based on https://rootlesscontaine.rs/getting-started/common/cgroup2/#enabling-cpu-cpuset-and-io-delegation , this patch enables I/O delegation for cgroups v2 enabled users. * gnu/services/containers.scm (cgroups-limits-entrypoint): Enable I/O controller delegation. * gnu/tests/containers.scm: Test it. Change-Id: I7caba33695f11830bea477c4ab3afb89cfaa2fa5 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
b7746ad83f
commit
24a12aeb91
2 changed files with 2 additions and 2 deletions
|
@ -174,7 +174,7 @@ (define cgroups-limits-entrypoint
|
||||||
#~(system*
|
#~(system*
|
||||||
(string-append #+bash-minimal "/bin/bash") "-c"
|
(string-append #+bash-minimal "/bin/bash") "-c"
|
||||||
(string-append "echo Setting cgroups v2 limits && "
|
(string-append "echo Setting cgroups v2 limits && "
|
||||||
"echo +cpu +cpuset +memory +pids"
|
"echo +cpu +cpuset +io +memory +pids"
|
||||||
" >> /sys/fs/cgroup/cgroup.subtree_control"))))
|
" >> /sys/fs/cgroup/cgroup.subtree_control"))))
|
||||||
|
|
||||||
(define (rootless-podman-cgroups-limits-service config)
|
(define (rootless-podman-cgroups-limits-service config)
|
||||||
|
|
|
@ -158,7 +158,7 @@ (define slurp
|
||||||
(loop (+ 1 attempts))))))))
|
(loop (+ 1 attempts))))))))
|
||||||
|
|
||||||
(test-equal "/sys/fs/cgroup/cgroup.subtree_control content is sound"
|
(test-equal "/sys/fs/cgroup/cgroup.subtree_control content is sound"
|
||||||
(list "cpu" "cpuset" "memory" "pids")
|
(list "cpu" "cpuset" "io" "memory" "pids")
|
||||||
(marionette-eval
|
(marionette-eval
|
||||||
`(begin
|
`(begin
|
||||||
(use-modules (srfi srfi-1)
|
(use-modules (srfi srfi-1)
|
||||||
|
|
Loading…
Reference in a new issue