From: Maximiliano Sandoval <m.sandoval@proxmox.com>
To: Dominik Rusovac <d.rusovac@proxmox.com>
Cc: pve-devel@lists.proxmox.com
Subject: Re: [pve-devel] [PATCH pve-manager] fix #7011: ceph monitor: set ownership of monitor logs
Date: Fri, 12 Dec 2025 16:38:56 +0100 [thread overview]
Message-ID: <s8oldj7aewf.fsf@proxmox.com> (raw)
In-Reply-To: <20251212130531.116019-1-d.rusovac@proxmox.com> (Dominik Rusovac's message of "Fri, 12 Dec 2025 14:05:31 +0100")
Dominik Rusovac <d.rusovac@proxmox.com> writes:
> 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@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;
When we call ceph-mon --mkfs a few lines above the file
/var/log/ceph/ceph-mon.$monid.log gets created with owner root:ceph. I
tried using --setuser=ceph instead, but that did not work out while this
approach does work.
It should be noted however that only the file mentioned above has the
wrong owner and that the chown calls above are a bit too greedy, however
this matches ceph-common post-install script better.
Tested-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
Reviewed-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
--
Maximiliano
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2025-12-12 15:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-12 13:05 Dominik Rusovac
2025-12-12 15:38 ` Maximiliano Sandoval [this message]
2025-12-16 7:25 ` Thomas Lamprecht
2025-12-16 12:06 ` Maximiliano Sandoval
2025-12-16 12:14 ` Thomas Lamprecht
2025-12-16 12:54 ` Maximiliano Sandoval
2025-12-17 7:33 ` Thomas Lamprecht
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=s8oldj7aewf.fsf@proxmox.com \
--to=m.sandoval@proxmox.com \
--cc=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.