[pve-devel] [PATCH pve-manager] fix #7011: ceph monitor: set ownership of monitor logs

Dominik Rusovac d.rusovac at proxmox.com
Fri Dec 12 14:05:31 CET 2025


Ownership of ceph logs 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
ceph logs 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 at proxmox.com>
---
 PVE/API2/Ceph/MON.pm | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/PVE/API2/Ceph/MON.pm b/PVE/API2/Ceph/MON.pm
index 70fc158d..047337ea 100644
--- a/PVE/API2/Ceph/MON.pm
+++ b/PVE/API2/Ceph/MON.pm
@@ -428,6 +428,12 @@ __PACKAGE__->register_method({
                             $mon_keyring,
                         ]);
                         run_command(['chown', 'ceph:ceph', '-R', $mondir]);
+
+                        eval {
+                            run_command('chown ceph:ceph /var/log/ceph');
+                            run_command('chown ceph:ceph /var/log/ceph/*.log*');
+                        };
+                        warn "$@" if $@;
                     };
                     my $err = $@;
                     unlink $monmap;
-- 
2.47.3





More information about the pve-devel mailing list