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 C63B292DCD for ; Mon, 2 Jan 2023 13:37:42 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id A53ED2F9FF for ; Mon, 2 Jan 2023 13:37:42 +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 ; Mon, 2 Jan 2023 13:37:42 +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 B0735443D7 for ; Mon, 2 Jan 2023 13:37:41 +0100 (CET) From: Christoph Heiss To: pve-devel@lists.proxmox.com Date: Mon, 2 Jan 2023 13:36:31 +0100 Message-Id: <20230102123633.2493599-1-c.heiss@proxmox.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.005 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 SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH manager/storage] fix #4289: 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jan 2023 12:37:42 -0000 When creating a backup to a PBS datastore which has the 'Verify New' flag set, the backup will fail with an "unable to set protected flag" error. This is due to the volume being immediately locked by the PBS server for verifying, before PVE has a chance to set the 'protected' flag. Fix this by waiting on the verification job to finish before attempting to set the volume flag. [ This is really more of an RFC if it even can be done in this 'naive' way: It feels a bit hacky, esp. the matching of the `worker_id` value, since this can be an arbitrary string according to the documentation. Maybe there is a better way to check for that? Also, should this use some timeout just to be safe? ] Christoph Heiss (1): vzdump: pass logfunc down into storage plugin when updating volume attribute PVE/VZDump.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) Christoph Heiss (1): fix #4289: pbs: wait for backup verification to finish before updating volume attribute PVE/Storage.pm | 4 ++-- PVE/Storage/PBSPlugin.pm | 27 ++++++++++++++++++++++++++- 2 files changed, 28 insertions(+), 3 deletions(-)