From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 15E6B1FF146 for ; Tue, 28 Apr 2026 04:46:16 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 0E8552447; Tue, 28 Apr 2026 04:46:02 +0200 (CEST) From: Kefu Chai To: pve-devel@lists.proxmox.com Subject: [PATCH manager 0/5] ceph: add 'pveceph upgrade-check' subcommand Date: Tue, 28 Apr 2026 10:45:33 +0800 Message-ID: <20260428024538.3559017-1-k.chai@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1777344249388 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.317 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_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.com,tools.pm,upgradecheck.pm,pveceph.pm,releases.pm,pve8to9.pm] Message-ID-Hash: API7V44OPCA6WGTWVNCSDS34ZV2CSR5I X-Message-ID-Hash: API7V44OPCA6WGTWVNCSDS34ZV2CSR5I X-MailFrom: k.chai@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Hi all, this series grew out of a chat with Shannon about how easy it is for upgraded Ceph clusters to silently miss out on features unlocked by later releases. After a Ceph upgrade, two OSDmap settings often stay at their old values, and admins forget to bump them: - require_osd_release: leaving this behind blocks OSD-side features the new release would otherwise enable. We warn if it is behind the running version. https://docs.ceph.com/en/latest/rados/operations/require-osd-release/ - require_min_compat_client: bumping this unlocks newer on-map features like pg-upmap-primary and the read-balancer, but it's a one-way change that excludes older clients on enable of any dependent feature. We notice (not warn) and walk the operator through 'ceph features' first, so they don't lock anyone out by accident. https://docs.ceph.com/en/latest/rados/operations/require-min-compat-client/ Both checks are advisory only. Shannon and I agreed that turning these knobs on the operator's behalf during an unattended upgrade would be a show-stopper, so we just nudge. While I was in there, I also added a 'pveceph upgrade-check' subcommand so operators can run a Ceph sanity check without having to wade through the full pve8to9 output. Ceph upgrades can happen multiple times across a PVE major-release cycle, and the standalone command makes more sense for that cadence. The plumbing: a new PVE::Ceph::UpgradeCheck module returns structured { level, msg } records, so 'pveceph upgrade-check' and the pve8to9 "CHECKING HYPER-CONVERGED CEPH STATUS" section share the same checks through their own log helpers. Patch 1 is a pure refactor of pve8to9's check_ceph() into the new module, byte-diff verified on a real cluster to make sure pve8to9 emits the same messages in the same order. Tested on a live PVE 9 / Ceph Squid cluster: pve8to9 output is byte-identical before/after the refactor (modulo the require_min_compat_client message wording this series polishes), and 'pveceph upgrade-check' fires both the positive case (require_osd_release == squid) and the negative case (require_min_compat_client == luminous) correctly. Summary line counts match the records emitted. A pve-docs follow-up for the new subcommand will land separately once this patchset gets merged. Thanks! Kefu Chai (5): pve8to9: extract ceph checks into PVE::Ceph::UpgradeCheck ceph: add pveceph upgrade-check command ceph: add require_osd_release upgrade check ceph: add require_min_compat_client upgrade check ceph: drop duplicate release-to-codename map in upgrade checks PVE/CLI/pve8to9.pm | 203 ++---------------- PVE/CLI/pveceph.pm | 45 ++++ PVE/Ceph/Makefile | 1 + PVE/Ceph/Releases.pm | 14 ++ PVE/Ceph/Tools.pm | 6 + PVE/Ceph/UpgradeCheck.pm | 441 +++++++++++++++++++++++++++++++++++++++ 6 files changed, 527 insertions(+), 183 deletions(-) create mode 100644 PVE/Ceph/UpgradeCheck.pm -- 2.47.3