From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <m.carrara@proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by lists.proxmox.com (Postfix) with ESMTPS id C3E2C90734
 for <pve-devel@lists.proxmox.com>; Tue,  2 Apr 2024 16:55:55 +0200 (CEST)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id A5A6E7FCD
 for <pve-devel@lists.proxmox.com>; Tue,  2 Apr 2024 16:55:25 +0200 (CEST)
Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com
 [94.136.29.106])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by firstgate.proxmox.com (Proxmox) with ESMTPS
 for <pve-devel@lists.proxmox.com>; Tue,  2 Apr 2024 16:55:24 +0200 (CEST)
Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1])
 by proxmox-new.maurer-it.com (Proxmox) with ESMTP id EC5C244776
 for <pve-devel@lists.proxmox.com>; Tue,  2 Apr 2024 16:55:23 +0200 (CEST)
From: Max Carrara <m.carrara@proxmox.com>
To: pve-devel@lists.proxmox.com
Date: Tue,  2 Apr 2024 16:55:12 +0200
Message-Id: <20240402145523.683008-1-m.carrara@proxmox.com>
X-Mailer: git-send-email 2.39.2
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-SPAM-LEVEL: Spam detection results:  0
 AWL -0.379 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DMARC_MISSING             0.1 Missing DMARC policy
 KAM_ASCII_DIVIDERS 0.8 Email that uses ascii formatting dividers and possible
 spam tricks
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
 URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See
 http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more
 information. [ceph.pm, proxmox.com, cephconfig.pm, mon.pm, tools.pm]
Subject: [pve-devel] [PATCH v5 pve-storage,
 pve-manager 00/11] Fix #4759: Configure Permissions for
 ceph-crash.service
X-BeenThere: pve-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/>
List-Post: <mailto:pve-devel@lists.proxmox.com>
List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe>
X-List-Received-Date: Tue, 02 Apr 2024 14:55:55 -0000

Fix #4759: Configure Permissions for ceph-crash.service - Version 5
===================================================================

Notable changes since v4
------------------------

  * The patches regarding Ceph Reef and Ceph Quincy have been applied in
    v4 and are thus dropped from this series (thanks Thomas!)
  * The tests for both the parser and the writer are rewritten, making
    them independent of one another
  * Many additional test cases
  * New test subroutine that compares each test case against Ceph's
    `ceph-conf` CLI in order to preemptively detect changes / regressions
    in Ceph's config file format
    - In total, there are now 37 test cases, each tested against 3
      testing subroutines, making 111 tests in total
  * The Ceph config writer now correctly escapes all un-escaped comment
    literals
  * The Ceph config parser is completely rewritten, making its
    implementation almost fully equivalent to Ceph's original parser
  * Suppress warning messages while running `postinst` of 'pve-manager'
    (thanks Friedrich!)
  * Prevent `deb-systemd-invoke` from failing (thanks Fabian!)

For a detailed list of changes, please see the comments in the in the
individual patches.

Post-Installation Version Guard
-------------------------------

The call to the new function in the `postinst` hook, which is introduced
in patch 09, now uses '0.0.0' as placeholder in its version guard.

When applying this series, this placeholder must be replaced with the
next expected version of the 'pve-manager' package in order to run the
Ceph configuration helper during users' next update (patches 09, 10).

Older Versions
--------------

v1: https://lists.proxmox.com/pipermail/pve-devel/2024-January/061546.html
v2: https://lists.proxmox.com/pipermail/pve-devel/2024-February/061646.html
v3: https://lists.proxmox.com/pipermail/pve-devel/2024-February/061802.html
v4: https://lists.proxmox.com/pipermail/pve-devel/2024-March/062093.html

Summary of Changes
------------------

pve-storage:

Max Carrara (8):
  cephconfig: change code style inside config writer
  test: add tests for 'ceph.conf' parser and writer
  test: cephconfig: add regression test for Ceph config parser & writer
  cephconfig: allow writing arbitrary sections
  cephconfig: change order of written sections
  cephconfig: align written key-value pairs by tab
  cephconfig: escape un-escaped comment literals on write
  cephconfig: align our parser with Ceph's parser

 debian/control                             |    1 +
 src/Makefile                               |    1 +
 src/PVE/CephConfig.pm                      |  282 +++++-
 src/PVE/Makefile                           |    4 +
 src/PVE/test/Makefile                      |    9 +
 src/PVE/test/ceph_conf_parse_write_test.pl | 1035 ++++++++++++++++++++
 6 files changed, 1305 insertions(+), 27 deletions(-)
 create mode 100644 src/PVE/test/Makefile
 create mode 100755 src/PVE/test/ceph_conf_parse_write_test.pl


pve-manager:

Max Carrara (3):
  ceph: introduce '/etc/pve/ceph'
  fix #4759: ceph: configure ceph-crash.service and its key
  bin/make: gather helper scripts in separate variable

 PVE/API2/Ceph.pm        |   5 ++
 PVE/API2/Ceph/MON.pm    |   8 +++
 PVE/Ceph/Tools.pm       |  47 ++++++++++++-
 bin/Makefile            |   6 +-
 bin/pve-init-ceph-crash | 142 ++++++++++++++++++++++++++++++++++++++++
 debian/postinst         |  25 +++++++
 6 files changed, 230 insertions(+), 3 deletions(-)
 create mode 100755 bin/pve-init-ceph-crash

-- 
2.39.2