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) server-digest SHA256) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 9B4E3BBC7D for ; Tue, 19 Dec 2023 14:13:47 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 6D73537C07 for ; Tue, 19 Dec 2023 14:13:17 +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 ; Tue, 19 Dec 2023 14:13:16 +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 28ADE48596 for ; Tue, 19 Dec 2023 14:13:16 +0100 (CET) Message-ID: <61f7d1e6-d1cb-4076-b67f-9a15ee9bee41@proxmox.com> Date: Tue, 19 Dec 2023 14:13:15 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Proxmox VE development discussion , =?UTF-8?Q?Fabian_Gr=C3=BCnbichler?= References: <20231215135154.284412-1-s.hanreich@proxmox.com> <1702986417.rjiew8jrm6.astroid@yuna.none> Content-Language: en-US From: Stefan Hanreich In-Reply-To: <1702986417.rjiew8jrm6.astroid@yuna.none> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.482 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 - Subject: Re: [pve-devel] [PATCH pve-manager v2] postinst: filter rbds in lvm 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: Tue, 19 Dec 2023 13:13:47 -0000 Although already shortly discussed off-list, here the summary of the discussion. v3 coming soon. On 12/19/23 12:54, Fabian Grünbichler wrote: > this part is now a lot stricter then before (e.g., if the user has > added multipath devices or something else to the filter for whatever > reason, the filter won't be extended). Yes indeed, although if I stuck with the previous logic the filter would have just gotten replaced which is arguably worse (imo). That's what I wanted to prevent with the change. > should we at least print a warning in that case? > iff > - the config is not default (OLD_VALUE is set) > - the old value is neither our expected old value nor our new value > > echo "non-default 'global_filter' value '$OLD_VALUE' in /etc/lvm/lvm.conf, not setting '$NEW_VALUE' automatically" > echo "consider adapting your 'global_filter' manually." Yes, that sounds sensible - I'll add printing a warning as else > also, the combination of marker found, but no $OLD_VALUE would indicate > that the user explicitly disabled/commented our previously set value - > maybe in that case we also should just print a warning instead of > overriding that choice? Yes indeed I hadn't thought of that - so we need to change the logic to this: $MARKER_FOUND = grep -qLF "$LVM_CONF_MARKER" /etc/lvm/lvm.conf (!$MARKER_FOUND && test -z "$OLD_VALUE") || (echo "$OLD_VALUE" | grep -qF '"r|/dev/zd.*|"')