From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id E0E641FF16F for ; Tue, 16 Sep 2025 19:21:04 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 39E6619DDA; Tue, 16 Sep 2025 19:21:16 +0200 (CEST) From: "Max R. Carrara" To: pve-devel@lists.proxmox.com Date: Tue, 16 Sep 2025 19:20:07 +0200 Message-ID: <20250916172012.739807-7-m.carrara@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20250916172012.739807-1-m.carrara@proxmox.com> References: <20250916172012.739807-1-m.carrara@proxmox.com> MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1758043265419 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.087 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH ceph master v1 6/6] fix #6816: patches: make ceph-exporter use custom keyring X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" Add a patch that sets the CEPH_KEYRING env var for the ceph-exporter daemon, telling it to use our custom keyring file. The patch also sets the group of the daemon to `www-data` so that the daemon can access the custom keyring. Fixes: #6816 Signed-off-by: Max R. Carrara --- ...orter-use-custom-keyring-and-set-gro.patch | 32 +++++++++++++++++++ patches/series | 1 + 2 files changed, 33 insertions(+) create mode 100644 patches/0056-systemd-ceph-exporter-use-custom-keyring-and-set-gro.patch diff --git a/patches/0056-systemd-ceph-exporter-use-custom-keyring-and-set-gro.patch b/patches/0056-systemd-ceph-exporter-use-custom-keyring-and-set-gro.patch new file mode 100644 index 0000000000..2603dbf0e7 --- /dev/null +++ b/patches/0056-systemd-ceph-exporter-use-custom-keyring-and-set-gro.patch @@ -0,0 +1,32 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: "Max R. Carrara" +Date: Tue, 16 Sep 2025 16:34:51 +0200 +Subject: [PATCH] systemd: ceph-exporter: use custom keyring and set group to + www-data + +With the help of `Environment=`, set the CEPH_KEYRING env var to point +to our custom keyring file location for the `ceph-exporter` daemon. + +Additionally, set the group of the `ceph-exporter` daemon to +`www-data`, so that it can access this keyring. + +Signed-off-by: Max R. Carrara +--- + systemd/ceph-exporter.service.in | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/systemd/ceph-exporter.service.in b/systemd/ceph-exporter.service.in +index f4f6d05c4b4..4e55939d201 100644 +--- a/systemd/ceph-exporter.service.in ++++ b/systemd/ceph-exporter.service.in +@@ -6,8 +6,9 @@ Before=ceph.target + Wants=network-online.target local-fs.target ceph.target ceph-mon.target + + [Service] ++Environment="CEPH_KEYRING=/etc/pve/ceph/ceph.client.exporter.keyring" + ExecReload=/bin/kill -HUP $MAINPID +-ExecStart=/usr/bin/ceph-exporter -f --id %i --setuser ceph --setgroup ceph ++ExecStart=/usr/bin/ceph-exporter -f --id exporter --setuser ceph --setgroup www-data + LockPersonality=true + NoNewPrivileges=true + PrivateDevices=yes diff --git a/patches/series b/patches/series index 6dd4562daa..9247a7be54 100644 --- a/patches/series +++ b/patches/series @@ -53,3 +53,4 @@ 0053-mgr-zabbix-fix-invalid-escape-sequences.patch 0054-client-prohibit-unprivileged-users-from-setting-sgid.patch 0055-pybind-rbd-disable-on_progress-callbacks-to-prevent-.patch +0056-systemd-ceph-exporter-use-custom-keyring-and-set-gro.patch -- 2.47.3 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel