From: Dominik Rusovac <d.rusovac@proxmox.com>
To: pve-devel@lists.proxmox.com
Cc: Dominik Rusovac <d.rusovac@proxmox.com>
Subject: [pve-devel] [PATCH pve-manager v2] fix #7011: ceph monitor: set ownership of monitor logs
Date: Wed, 17 Dec 2025 09:38:19 +0100 [thread overview]
Message-ID: <20251217083819.33912-1-d.rusovac@proxmox.com> (raw)
Ownership of the ceph monitor log file is now set to ceph:ceph after the
creation of a new monitor and before the new monitor starts. Hence,
effective ceph monitor logging on freshly set up ceph clusters no longer
depends on the first upgrade of ceph-common.
For setups (still) affected by #7011 it is required that ownership of
the ceph monitor log file is set to ceph:ceph (either manually or due to
some ceph-common upgrade), followed by a monitor restart.
Signed-off-by: Dominik Rusovac <d.rusovac@proxmox.com>
---
PVE/API2/Ceph/MON.pm | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/PVE/API2/Ceph/MON.pm b/PVE/API2/Ceph/MON.pm
index 70fc158d..18407b1c 100644
--- a/PVE/API2/Ceph/MON.pm
+++ b/PVE/API2/Ceph/MON.pm
@@ -428,6 +428,15 @@ __PACKAGE__->register_method({
$mon_keyring,
]);
run_command(['chown', 'ceph:ceph', '-R', $mondir]);
+
+ eval {
+ # fix-up initial log file from freshly created monitor here, as currently
+ # we cannot instruct ceph-mon to create it with the correct ownership without
+ # losing access to the mon keyring inside pmxcfs.
+ run_command(
+ ['chown', 'ceph:ceph', "/var/log/ceph/ceph-mon.$monid.log"]);
+ };
+ warn "$@" if $@;
};
my $err = $@;
unlink $monmap;
--
2.47.3
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next reply other threads:[~2025-12-17 8:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-17 8:38 Dominik Rusovac [this message]
2025-12-17 9:13 ` Dominik Rusovac
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251217083819.33912-1-d.rusovac@proxmox.com \
--to=d.rusovac@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox