From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 AEFE994EF7 for ; Fri, 23 Feb 2024 17:20:16 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 897C11BD30 for ; Fri, 23 Feb 2024 17:19:46 +0100 (CET) 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) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Fri, 23 Feb 2024 17:19:45 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 989C144E2A for ; Fri, 23 Feb 2024 17:19:45 +0100 (CET) Message-ID: Date: Fri, 23 Feb 2024 17:19:44 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: Max Carrara , Proxmox VE development discussion References: <20240216145615.2301594-1-m.carrara@proxmox.com> <4fa0d7e0-c428-48e0-85ee-422aa8d26e99@proxmox.com> From: Friedrich Weber In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.080 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 T_SCC_BODY_TEXT_LINE -0.01 - URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [proxmox.com] Subject: Re: [pve-devel] [PATCH v3 ceph master, ceph quincy-stable 8, pve-storage, pve-manager 00/13] 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Feb 2024 16:20:16 -0000 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. Nice! > 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]: [client.crash] key = ... after the upgrade, this user will end up with the following [client.crash] section: [client.crash] key = keyring = /etc/pve/ceph/$cluster.$name.keyring and the same keyring in /etc/pve/ceph/ceph.client.crash.keyring. 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