From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 547531FF0B3 for ; Wed, 14 Oct 2026 12:54:58 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 7C30B2137A; Wed, 14 Oct 2026 12:54:56 +0200 (CEST) From: Kefu Chai To: pve-devel@lists.proxmox.com Subject: Re: [RFC] letting Ceph read its own config as the ceph user Date: Wed, 14 Oct 2026 18:54:48 +0800 Message-ID: <20261014105448.2660976-1-k.chai@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261013092516.1596661-1-k.chai@proxmox.com> References: <20261013092516.1596661-1-k.chai@proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1791975291590 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.362 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: 5IESE7ZLEM33ZHWG2ZYX5QWP75ABGC6C X-Message-ID-Hash: 5IESE7ZLEM33ZHWG2ZYX5QWP75ABGC6C 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, Maximiliano kindly went through the ceph.conf part with me off-list, and I'd like to change a few things from the RFC: - I'd keep the /etc/ceph/ceph.conf symlink after all. Otherwise edits made through it would stay on one node and get overwritten, and PVE itself relies on the symlink in a few places (setup_pve_symlinks(), check_ceph_enabled()). - The copy would go to a separate path instead, as root:ceph 0440. I think its directory should be owned by root, since the mon and OSDs read the config before dropping privileges. That rules out /var/lib/ceph and /etc/ceph, which are both owned by ceph. pmxcfs's own /var/lib/pve-cluster would work, so I'll use /var/lib/pve-cluster/ceph.conf below, but better ideas are welcome. - The Ceph services could find the copy through a single drop-in in ceph-.service.d/: Environment=CEPH_CONF=/var/lib/pve-cluster/ceph.conf,/etc/ceph/ceph.conf If the copy is missing, Ceph falls back to the symlink. I tried this with one mgr: after "ceph mgr fail" it came back as ceph and found the copy, without systemd having to restart it. - Sorry, the systemd path unit I suggested as a fallback doesn't work. It only notices changes made on the local node, not the ones coming from other nodes. I haven't figured out yet how to make a failed copy visible. Maybe a log message, or a health check. The ceph-crash error at boot had two causes in the end, and I sent a fix for each: - ceph-crash wasn't ordered after pve-cluster. The pve-manager patch [1] replaces the per-unit drop-ins with one for all ceph-* units, so it now covers ceph-crash and a few other units we had missed. - Its startup ping ran "ceph -s" as client.admin, whose key ceph-crash can't read. With the Ceph PR [2], it uses the same keys it posts crashes with. The rest of the RFC stays the same. Thanks again, Maximiliano, for your help! Cheers, Kefu [1] https://lore.proxmox.com/pve-devel/20261014104321.2652781-1-k.chai@proxmox.com/T/#u [2] https://github.com/ceph/ceph/pull/72674