public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH v2 master ceph, quincy-stable 8 ceph, pve-storage, pve-manager 00/11] Fix #4759: Configure Permissions for ceph-crash.service
@ 2024-02-05 17:54 Max Carrara
  2024-02-05 17:54 ` [pve-devel] [PATCH v2 master ceph 01/11] debian: add patch to fix ceph crash dir permissions in postinst hook Max Carrara
                   ` (10 more replies)
  0 siblings, 11 replies; 29+ messages in thread
From: Max Carrara @ 2024-02-05 17:54 UTC (permalink / raw)
  To: pve-devel

This marks version 02 of the patch series "Fix #4759: Configure
Permissions for ceph-crash.service" [0]. 

Each patch also lists which changes have been made between versions.

Other changes not otherwise mentioned in patches:
  v1 --> v2:
    * drop patch regarding POSIX compatibility in debian/postinst hook 
      as suggested [1]


Regarding `ceph.client.crash.keyring`
-------------------------------------

One idea [2] that was mentioned was to have a keyring for each host
instead of sharing a keyring on pmxcfs. While that is indeed possible,
it would require host-specific `client.crash` keys, each requiring
a separate section ('client.crash.$HOSTNAME'). Alternatively, the
default search path location may also be changed, however, the Ceph docs
do not recommend this [3]:

> It is possible to override this search-path location by adding a
> `keyring` option in the `[global]` section of your Ceph configuration
> file, but this is not recommended.

In our case, `ceph-crash` appears to try
'/etc/pve/priv/ceph.client.crash.$HOSTNAME.keyring' first (and
subsequently logs an authentication error) before attempting to
authenticate via other clients/keyrings, which aligns with what Fabian
had discovered.

It is therefore easier to:
  * have one keyring file at '/etc/pve/ceph/ceph.client.crash.keyring'
  * have the configuration point to that file
  * patch Ceph in order to make `ceph-crash` try to authenticate with
    'client.crash' first

This gets rid of the unnecessary warnings and errors that otherwise show
up in the systemd journal.

Furthermore, the Ceph Crash docs use 'client.crash' [4], so I personally
doubt that upstream expects that people use the host-specific key;
rather, it seems that any of the three keys is fine.

Further points I have regarding sharing the key via pmxcfs:
  * in case the key & keyring file ever need to be rotated, only a
    single file location and cephx auth entry needs to be updated
    - instead of having to update every host's key *and* each
      corresponding cephx auth entry

  * the key is generated only once, exactly when the first monitor is
    created
    - otherwise we would need to ensure that the host-specific keys
      exist and are reliably added to cephx - e.g. per each use of
      `pveceph init` while also having to set up the first host-specific
      key when the first monitor is created via `pveceph mon create`

  * the keyring file's name doesn't need to be changed if the hostname
    changes (although that's admittedly a very minor benefit)

  * overall less administrative friction for the user (again, single
    location, single cephx auth entry)

Therefore, I decided to keep most things as they were with other
suggestions incorporated. The order of the identities that `ceph-crash`
checks is adapted, in order to "suppress" the warnings in the systemd
journal.

Though, I will of course consider any feedback in this regard,
especially if my reasoning here proves to be erroneous.


[0]: https://lists.proxmox.com/pipermail/pve-devel/2024-January/061546.html
[1]: https://lists.proxmox.com/pipermail/pve-devel/2024-January/061561.html
[2]: https://lists.proxmox.com/pipermail/pve-devel/2024-January/061566.html
[3]: https://docs.ceph.com/en/reef/rados/configuration/auth-config-ref/#enabling-cephx
[4]: https://docs.ceph.com/en/quincy/mgr/crash/#enabling



ceph (master):

Max Carrara (2):
  debian: add patch to fix ceph crash dir permissions in postinst hook
  patches: add patch that reorders clients used by ceph-crash

 ...rmissions-of-subdirectories-of-var-l.patch | 50 +++++++++++++++++++
 ...h-crash-change-order-of-client-names.patch | 30 +++++++++++
 patches/series                                |  2 +
 3 files changed, 82 insertions(+)
 create mode 100644 patches/0015-debian-adjust-permissions-of-subdirectories-of-var-l.patch
 create mode 100644 patches/0016-ceph-crash-change-order-of-client-names.patch


ceph (quincy-stable-8):

Max Carrara (2):
  debian: add patch to fix ceph crash dir permissions in postinst hook
  patches: add patch that reorders clients used by ceph-crash

 ...rmissions-of-subdirectories-of-var-l.patch | 50 +++++++++++++++++++
 ...h-crash-change-order-of-client-names.patch | 30 +++++++++++
 patches/series                                |  2 +
 3 files changed, 82 insertions(+)
 create mode 100644 patches/0024-debian-adjust-permissions-of-subdirectories-of-var-l.patch
 create mode 100644 patches/0025-ceph-crash-change-order-of-client-names.patch


pve-storage:

Max Carrara (3):
  cephconfig: align our parser more with Ceph's parser
  cephconfig: allow writing arbitrary sections
  amend! cephconfig: allow writing arbitrary sections

 src/PVE/CephConfig.pm | 42 +++++++++++++++++++++++++++---------------
 1 file changed, 27 insertions(+), 15 deletions(-)


pve-manager:

Max Carrara (4):
  ceph: fix edge case of wrong files being deleted on purge
  fix #4759: ceph: configure keyring for ceph-crash.service
  ceph: create '/etc/pve/ceph' during `pveceph init`
  fix #4759: debian/postinst: configure ceph-crash.service and its key

 PVE/API2/Ceph.pm     |   5 ++
 PVE/API2/Ceph/MON.pm |  17 ++++++-
 PVE/Ceph/Tools.pm    |  57 +++++++++++++++++++---
 debian/postinst      | 113 +++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 185 insertions(+), 7 deletions(-)


-- 
2.39.2





^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2024-02-14 12:43 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-05 17:54 [pve-devel] [PATCH v2 master ceph, quincy-stable 8 ceph, pve-storage, pve-manager 00/11] Fix #4759: Configure Permissions for ceph-crash.service Max Carrara
2024-02-05 17:54 ` [pve-devel] [PATCH v2 master ceph 01/11] debian: add patch to fix ceph crash dir permissions in postinst hook Max Carrara
2024-02-12 13:32   ` Fabian Grünbichler
2024-02-13  8:25     ` Max Carrara
2024-02-05 17:54 ` [pve-devel] [PATCH v2 master ceph 02/11] patches: add patch that reorders clients used by ceph-crash Max Carrara
2024-02-12 13:33   ` Fabian Grünbichler
2024-02-05 17:54 ` [pve-devel] [PATCH v2 quincy-stable-8 ceph 03/11] debian: add patch to fix ceph crash dir permissions in postinst hook Max Carrara
2024-02-12 13:32   ` Fabian Grünbichler
2024-02-05 17:54 ` [pve-devel] [PATCH v2 quincy-stable-8 ceph 04/11] patches: add patch that reorders clients used by ceph-crash Max Carrara
2024-02-12 13:33   ` Fabian Grünbichler
2024-02-05 17:54 ` [pve-devel] [PATCH v2 pve-storage 05/11] cephconfig: align our parser more with Ceph's parser Max Carrara
2024-02-12 13:33   ` Fabian Grünbichler
2024-02-13  8:34     ` Max Carrara
2024-02-05 17:54 ` [pve-devel] [PATCH v2 pve-storage 06/11] cephconfig: allow writing arbitrary sections Max Carrara
2024-02-12 13:33   ` Fabian Grünbichler
2024-02-13  8:46     ` Max Carrara
2024-02-05 17:54 ` [pve-devel] [PATCH v2 pve-storage 07/11] amend! " Max Carrara
2024-02-12 13:33   ` Fabian Grünbichler
2024-02-13  8:50     ` Max Carrara
2024-02-05 17:54 ` [pve-devel] [PATCH v2 pve-manager 08/11] ceph: fix edge case of wrong files being deleted on purge Max Carrara
2024-02-12 13:33   ` [pve-devel] applied: " Fabian Grünbichler
2024-02-05 17:54 ` [pve-devel] [PATCH v2 pve-manager 09/11] fix #4759: ceph: configure keyring for ceph-crash.service Max Carrara
2024-02-12 13:34   ` Fabian Grünbichler
2024-02-13  9:09     ` Max Carrara
2024-02-14 12:43       ` Max Carrara
2024-02-05 17:54 ` [pve-devel] [PATCH v2 pve-manager 10/11] ceph: create '/etc/pve/ceph' during `pveceph init` Max Carrara
2024-02-05 17:54 ` [pve-devel] [PATCH v2 pve-manager 11/11] fix #4759: debian/postinst: configure ceph-crash.service and its key Max Carrara
2024-02-12 13:34   ` Fabian Grünbichler
2024-02-13  9:25     ` Max Carrara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal