[pve-devel] [PATCH v3 ceph master, ceph quincy-stable 8, pve-storage, pve-manager 00/13] Fix #4759: Configure Permissions for ceph-crash.service

Friedrich Weber f.weber at proxmox.com
Fri Feb 23 17:19:44 CET 2024

On 21/02/2024 14:15, Max Carrara wrote:
> On 2/21/24 12:55, Friedrich Weber wrote:
>> [...]
>> - the `ceph-crash` service does not restart after installing the patched
>> ceph-base package, so the reordering done by patches 02+04 does not take
>> effect immediately: ceph-crash posts crash logs just fine, but logs to
>> the journal that it can't find a keyring. After a restart of ceph-crash,
>> the patch takes effect, so only a tiny inconvenience, but still: Not
>> sure if restarting the service is something we'd want to do in a
>> postinst -- is this an acceptable thing to do in a postinst?
> Initially the service was being restarted, but that's omitted in the new
> hook, as Fabian and I had noticed that `ceph-crash` just checks for its
> expected keys after its waiting period again anyways. I had unfortunately
> forgotten to put that into the changelog of the postinst hook stuff -
> mea culpa>
> I think restarting the service would be necessary then in order to apply
> the new sequence which keys are checked in, as that's hard-coded in
> `ceph-crash`.
> It certainly should be acceptable (as we already do it in some instances),
> as long as we restart it only if the service is enabled. That was part
> of the old BASH function anyway - I don't think there's any harm in adding
> it back (either in BASH or Perl).

If it's acceptable, I think it would be nice to restart ceph-crash (it
doesn't seem to be restarted that often).

>> - Might there be issues in a mixed-version cluster scenario, so if some
>> node A already has an updated pve-storage package (patches 05-10), but
>> node B doesn't yet? One thing I noticed is that node A will add the
>> [client.crash] section, but node B may remove it again when it needs to
>> rewrite the Ceph config (e.g. when creating a monitor). I don't find
>> this particular issue too concerning, as hopefully node B will be
>> updated eventually as well and reinstate the [client.crash] section. But
>> I wonder if there could be other more serious issues?
> The scenario you mentioned might indeed happen somehow, but once all
> nodes are updated - even if the config has been changed inbetween updates -
> the '[client.crash]' section should definitely exist.
> One issue that's been fixed by moving things to the Perl helper is that
> simultaneous updates could potentially modify 'ceph.conf' at the same time
> - the Perl helper now locks the file on pmxcfs, so that cannot happen anymore.


> I cannot think of any other scenario at the moment.

Yeah, me neither.

> In any case, even if *somehow* 'ceph.conf' ends up not containing the section
> or the keyring file ends up missing, the helper script will be available
> after the update has been performed, so it's possible to just run it again
> manually to adapt the config.
> That being said, this reminds me that the '[ceph.crash]' section, the location
> of the keyring file, etc. should probably be in our docs as well, so I will
> send in a follow-up series for that (unless this series ends up needing a v4,
> then I'll include it there).
> Thanks again for the feedback and the tests you ran!

Sure! I ran some more tests installing a fresh Reef cluster with the
patched packages, and did not notice any major issues.

One minor thing I noticed: If a user has manually worked around the
issue by generating a client.crash keyring, and adding a [client.crash]
section, as described in [1]:

    key = <yourbase64key>

... after the upgrade, this user will end up with the following
[client.crash] section:

key = <yourbase64key>
keyring = /etc/pve/ceph/$cluster.$name.keyring

and the same keyring <yourbase64key> in

In my test this is not a problem, though (probably since both keys are
the same).

[1] https://bugzilla.proxmox.com/show_bug.cgi?id=4759#c7

More information about the pve-devel mailing list