From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id A5B861FF165 for ; Thu, 25 Sep 2025 18:06:54 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 0CA2E25C50; Thu, 25 Sep 2025 18:07:25 +0200 (CEST) From: "Max R. Carrara" To: pve-devel@lists.proxmox.com Date: Thu, 25 Sep 2025 18:07:19 +0200 Message-ID: <20250925160721.445256-1-m.carrara@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1758816427280 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.086 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 Subject: [pve-devel] [PATCH pve-storage master v1] fix #6845: make regexes in zvol deletion retry logic less restrictive 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: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" As reported by a storage plugin developer in our community [0], some plugins might not throw an exception in the exact format we expect. Since we only execute `zfs` subcommands (except for `zpool list`) [1] over SSH if `$method` is not a "LUN command" [2], the command executed on the remote is always `zfs destroy -r [...]`. Therefore, match against "dataset is busy" / "dataset does not exist" directly. Tested this with an LIO iSCSI provider set up in a Debian Trixie VM, as well as with the "legacy" proxmox-truenas plugin of the community [3] (the one that patches our existing sources), by migrating a VM's disk back and forth between the two ZFS-over-iSCSI storages, and also to others and back again. [0]: https://lore.proxmox.com/pve-devel/mailman.271.1758597756.390.pve-devel@lists.proxmox.com/ [1]: https://git.proxmox.com/?p=pve-storage.git;a=blob;f=src/PVE/Storage/ZFSPlugin.pm;h=99d8c8f43a27ae911ffd09c3aa9f25f1a8857015;hb=refs/heads/master#l84 [2]: https://git.proxmox.com/?p=pve-storage.git;a=blob;f=src/PVE/Storage/ZFSPlugin.pm;h=99d8c8f43a27ae911ffd09c3aa9f25f1a8857015;hb=refs/heads/master#l22 [3]: https://github.com/boomshankerx/proxmox-truenas Fixes: #6845 Signed-off-by: Max R. Carrara --- NOTE: If there are any other iSCSI providers I should test this with, I don't mind at all--it just takes a while to set everything up. src/PVE/Storage/ZFSPoolPlugin.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PVE/Storage/ZFSPoolPlugin.pm b/src/PVE/Storage/ZFSPoolPlugin.pm index d8d8d0f..3b3456b 100644 --- a/src/PVE/Storage/ZFSPoolPlugin.pm +++ b/src/PVE/Storage/ZFSPoolPlugin.pm @@ -368,9 +368,9 @@ sub zfs_delete_zvol { eval { $class->zfs_request($scfg, undef, 'destroy', '-r', "$scfg->{pool}/$zvol"); }; if ($err = $@) { - if ($err =~ m/^zfs error:(.*): dataset is busy.*/) { + if ($err =~ m/dataset is busy/) { sleep(1); - } elsif ($err =~ m/^zfs error:.*: dataset does not exist.*$/) { + } elsif ($err =~ m/dataset does not exist/) { $err = undef; last; } else { -- 2.47.3 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel