From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <f.ebner@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) server-digest SHA256)
 (No client certificate requested)
 by lists.proxmox.com (Postfix) with ESMTPS id 75914942C1
 for <pve-devel@lists.proxmox.com>; Tue, 10 Jan 2023 14:21:56 +0100 (CET)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id 5DA72AD9E
 for <pve-devel@lists.proxmox.com>; Tue, 10 Jan 2023 14:21:56 +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))
 (No client certificate requested)
 by firstgate.proxmox.com (Proxmox) with ESMTPS
 for <pve-devel@lists.proxmox.com>; Tue, 10 Jan 2023 14:21:55 +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 9AB9844D79
 for <pve-devel@lists.proxmox.com>; Tue, 10 Jan 2023 14:21:55 +0100 (CET)
Message-ID: <887051ff-30e4-2fb7-f2f5-90d6770e05d5@proxmox.com>
Date: Tue, 10 Jan 2023 14:21:54 +0100
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
 Thunderbird/102.5.0
Content-Language: en-US
To: pve-devel@lists.proxmox.com, Christoph Heiss <c.heiss@proxmox.com>
References: <20230102123633.2493599-1-c.heiss@proxmox.com>
 <20230102123633.2493599-3-c.heiss@proxmox.com>
 <dff207ed-4116-2010-1be0-d3b263469ea9@proxmox.com>
 <20230110111141.2hxrozsr7fatvswj@maui.proxmox.com>
 <cd42c9e1-f890-0b6a-b00b-5ef96f74a513@proxmox.com>
 <20230110124441.g6mapiv7yauo2xjc@maui.proxmox.com>
 <159837ba-f916-7b03-2cab-8e486b38b6bb@proxmox.com>
From: Fiona Ebner <f.ebner@proxmox.com>
In-Reply-To: <159837ba-f916-7b03-2cab-8e486b38b6bb@proxmox.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-SPAM-LEVEL: Spam detection results:  0
 AWL -0.127 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 NICE_REPLY_A           -0.001 Looks like a legit reply (A)
 POISEN_SPAM_PILL          0.1 Meta: its spam
 POISEN_SPAM_PILL_1        0.1 random spam to be learned in bayes
 POISEN_SPAM_PILL_3        0.1 random spam to be learned in bayes
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
Subject: Re: [pve-devel] [PATCH storage] fix #4289: pbs: wait for backup
 verification to finish before updating volume attribute
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, 10 Jan 2023 13:21:56 -0000

Am 10.01.23 um 14:06 schrieb Fiona Ebner:
> Am 10.01.23 um 13:44 schrieb Christoph Heiss:
>> On Tue, Jan 10, 2023 at 01:34:14PM +0100, Fiona Ebner wrote:
>>> One way to decide if the current behavior should be used as a fallback
>>> would be to check the protected status after finishing the backup. That
>>> is slightly racy though, because something else could've already changed
>>> the protection between finishing and the check.
>> I'd base it off the decision from above - if the `proxmox-backup-client`
>> version supports setting it directly, use that, otherwise simply fall
>> back.
> It's not just the client, but the server that needs to support it too.
> To make sure that the client/QEMU/etc. support it, we can just have
> pve-manager depend on a recent enough version. For the server, there is
> a /version API endpoint we can query.

For QEMU, we don't want to force specific package versions, so using
package dependency is not good there. Instead, we can use the
'query-proxmox-support' QMP command to see if it's supported. That also
makes the check work for already running VMs.