From: "Max R. Carrara" <m.carrara@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH pve-storage master v1] fix #6845: make regexes in zvol deletion retry logic less restrictive
Date: Thu, 25 Sep 2025 18:07:19 +0200 [thread overview]
Message-ID: <20250925160721.445256-1-m.carrara@proxmox.com> (raw)
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 <m.carrara@proxmox.com>
---
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
reply other threads:[~2025-09-25 16:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250925160721.445256-1-m.carrara@proxmox.com \
--to=m.carrara@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox