From patchwork Mon Jan 6 21:05:52 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: paul X-Patchwork-Id: 36692 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 63CBE27BBEA; Mon, 6 Jan 2025 21:07:36 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 1AF9727BBE2 for ; Mon, 6 Jan 2025 21:07:36 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tUuJa-0004mo-8d; Mon, 06 Jan 2025 16:07:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tUuJT-0004lC-R2 for guix-patches@gnu.org; Mon, 06 Jan 2025 16:07:04 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tUuJT-0001hH-IF for guix-patches@gnu.org; Mon, 06 Jan 2025 16:07:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=aONOcpGh0yljEwS7b66iQOQiLxcLROpIn/DnRdrvnQQ=; b=rKSmgJ41O4yC2UTzVIHaygQnOPgnUw4lRE2NHMDVcid0TEFjJ+HEtS4LUV6eGcwgVqWlS2x4o75GjWvQ6H33+JsgGLSyFpgNi8fN4ixGdQU6XSUocxxJ13mRUcZV8T7jgLvIUjyg/TkegY9FEuiPNwGCJ2albYVnzVatLlyubs4f05hEDa6YQvcfEkWsVVYt/HxBm7jmsoLAWJZ3MZvvt961fA9+IBIE5a+ZFDjtuDrIX8L9R5W/ouey8P4XI5FTZ9bCCJNjxnFJ0UH893bEVyXbSPhE6ZNwTlpl47ruBFLBmbzUOLpIDhkMqqNvgoqjIGOWiBM8LLKC6kjgOAEXTA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tUuJT-0003E7-DI for guix-patches@gnu.org; Mon, 06 Jan 2025 16:07:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#75203] [PATCH v2 2/2] services: rootless-podman: Enable I/O delegation. Resent-From: Giacomo Leidi Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 06 Jan 2025 21:07:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75203 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 75203@debbugs.gnu.org Cc: Giacomo Leidi Received: via spool by 75203-submit@debbugs.gnu.org id=B75203.173619757412288 (code B ref 75203); Mon, 06 Jan 2025 21:07:03 +0000 Received: (at 75203) by debbugs.gnu.org; 6 Jan 2025 21:06:14 +0000 Received: from localhost ([127.0.0.1]:40657 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tUuIg-0003C7-0L for submit@debbugs.gnu.org; Mon, 06 Jan 2025 16:06:14 -0500 Received: from confino.investici.org ([2a11:7980:1::2:0]:42069) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tUuId-0003Bg-QO for 75203@debbugs.gnu.org; Mon, 06 Jan 2025 16:06:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1736197571; bh=aONOcpGh0yljEwS7b66iQOQiLxcLROpIn/DnRdrvnQQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A1RxiBDD8T4w4jhDB31q3/lopy08RI45Id29AMfkzWnEZitWpp0AFrUBelyxScD6j 9IYXIRu9Fj1OMGwit12DHb8yDuC3551KxaeGYQlJyAwLOPAPFqaoHNE/wr7Mz2PxBc 9z5ne7JbN/214R3AxghC3xcck2AhOdLFJHEERrGY= Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4YRmtq0CBDz10x5; Mon, 6 Jan 2025 21:06:11 +0000 (UTC) Received: from [93.190.126.19] (mx1.investici.org [93.190.126.19]) (Authenticated sender: goodoldpaul@autistici.org) by localhost (Postfix) with ESMTPSA id 4YRmtp6MvYz10x3; Mon, 6 Jan 2025 21:06:10 +0000 (UTC) Date: Mon, 6 Jan 2025 22:05:52 +0100 Message-ID: <0bedc9d2ce58aa24d920c20d15782c9eb5255ea5.1736197552.git.goodoldpaul@autistici.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Giacomo Leidi X-ACL-Warn: , Giacomo Leidi via Guix-patches X-Patchwork-Original-From: Giacomo Leidi via Guix-patches via From: paul Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches 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 --- gnu/services/containers.scm | 2 +- gnu/tests/containers.scm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/services/containers.scm b/gnu/services/containers.scm index a82fb64db3..19d35ccbcb 100644 --- a/gnu/services/containers.scm +++ b/gnu/services/containers.scm @@ -174,7 +174,7 @@ (define cgroups-limits-entrypoint #~(system* (string-append #+bash-minimal "/bin/bash") "-c" (string-append "echo Setting cgroups v2 limits && " - "echo +cpu +cpuset +memory +pids" + "echo +cpu +cpuset +io +memory +pids" " >> /sys/fs/cgroup/cgroup.subtree_control")))) (define (rootless-podman-cgroups-limits-service config) diff --git a/gnu/tests/containers.scm b/gnu/tests/containers.scm index 69cd311c82..0ecc8ddb12 100644 --- a/gnu/tests/containers.scm +++ b/gnu/tests/containers.scm @@ -158,7 +158,7 @@ (define (run-rootless-podman-test oci-tarball) (loop (+ 1 attempts)))))))) (test-equal "/sys/fs/cgroup/cgroup.subtree_control content is sound" - (list "cpu" "cpuset" "memory" "pids") + (list "cpu" "cpuset" "io" "memory" "pids") (marionette-eval `(begin (use-modules (srfi srfi-1)