* [pve-devel] [PATCH-SERIES guest-common 0/3] fix #6808: abstract config: snapshot delete: improve error when snapshot on volume is missing
@ 2025-09-19 16:16 Fiona Ebner
2025-09-19 16:16 ` [pve-devel] [PATCH guest-common 1/3] abstract config: order module imports Fiona Ebner
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Fiona Ebner @ 2025-09-19 16:16 UTC (permalink / raw)
To: pve-devel
In case of a ZFS volume the message would be a rather unhelpful:
> zfs error: could not find any snapshots to destroy; check snapshot names.
Mention the volume name and that the force parameter can be used if
desired.
Fiona Ebner (3):
abstract config: order module imports
abstract config: add missing JSONSchema import
fix #6808: abstract config: snapshot delete: improve error when
snapshot on volume is missing
src/PVE/AbstractConfig.pm | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
--
2.47.3
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [pve-devel] [PATCH guest-common 1/3] abstract config: order module imports
2025-09-19 16:16 [pve-devel] [PATCH-SERIES guest-common 0/3] fix #6808: abstract config: snapshot delete: improve error when snapshot on volume is missing Fiona Ebner
@ 2025-09-19 16:16 ` Fiona Ebner
2025-09-19 16:16 ` [pve-devel] [PATCH guest-common 2/3] abstract config: add missing JSONSchema import Fiona Ebner
2025-09-19 16:16 ` [pve-devel] [PATCH guest-common 3/3] fix #6808: abstract config: snapshot delete: improve error when snapshot on volume is missing Fiona Ebner
2 siblings, 0 replies; 4+ messages in thread
From: Fiona Ebner @ 2025-09-19 16:16 UTC (permalink / raw)
To: pve-devel
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
src/PVE/AbstractConfig.pm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/PVE/AbstractConfig.pm b/src/PVE/AbstractConfig.pm
index 420a10d..7a4abbd 100644
--- a/src/PVE/AbstractConfig.pm
+++ b/src/PVE/AbstractConfig.pm
@@ -3,10 +3,10 @@ package PVE::AbstractConfig;
use strict;
use warnings;
-use PVE::Tools qw(lock_file lock_file_full);
-use PVE::INotify;
use PVE::Cluster;
+use PVE::INotify;
use PVE::Storage;
+use PVE::Tools qw(lock_file lock_file_full);
use PVE::GuestHelpers qw(typesafe_ne);
use PVE::ReplicationConfig;
--
2.47.3
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [pve-devel] [PATCH guest-common 2/3] abstract config: add missing JSONSchema import
2025-09-19 16:16 [pve-devel] [PATCH-SERIES guest-common 0/3] fix #6808: abstract config: snapshot delete: improve error when snapshot on volume is missing Fiona Ebner
2025-09-19 16:16 ` [pve-devel] [PATCH guest-common 1/3] abstract config: order module imports Fiona Ebner
@ 2025-09-19 16:16 ` Fiona Ebner
2025-09-19 16:16 ` [pve-devel] [PATCH guest-common 3/3] fix #6808: abstract config: snapshot delete: improve error when snapshot on volume is missing Fiona Ebner
2 siblings, 0 replies; 4+ messages in thread
From: Fiona Ebner @ 2025-09-19 16:16 UTC (permalink / raw)
To: pve-devel
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
src/PVE/AbstractConfig.pm | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/PVE/AbstractConfig.pm b/src/PVE/AbstractConfig.pm
index 7a4abbd..d403021 100644
--- a/src/PVE/AbstractConfig.pm
+++ b/src/PVE/AbstractConfig.pm
@@ -5,6 +5,7 @@ use warnings;
use PVE::Cluster;
use PVE::INotify;
+use PVE::JSONSchema;
use PVE::Storage;
use PVE::Tools qw(lock_file lock_file_full);
--
2.47.3
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [pve-devel] [PATCH guest-common 3/3] fix #6808: abstract config: snapshot delete: improve error when snapshot on volume is missing
2025-09-19 16:16 [pve-devel] [PATCH-SERIES guest-common 0/3] fix #6808: abstract config: snapshot delete: improve error when snapshot on volume is missing Fiona Ebner
2025-09-19 16:16 ` [pve-devel] [PATCH guest-common 1/3] abstract config: order module imports Fiona Ebner
2025-09-19 16:16 ` [pve-devel] [PATCH guest-common 2/3] abstract config: add missing JSONSchema import Fiona Ebner
@ 2025-09-19 16:16 ` Fiona Ebner
2 siblings, 0 replies; 4+ messages in thread
From: Fiona Ebner @ 2025-09-19 16:16 UTC (permalink / raw)
To: pve-devel
In case of a ZFS volume the message would be a rather unhelpful:
> zfs error: could not find any snapshots to destroy; check snapshot names.
Mention the volume name and that the force parameter can be used if
desired.
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
src/PVE/AbstractConfig.pm | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/PVE/AbstractConfig.pm b/src/PVE/AbstractConfig.pm
index d403021..23f62d4 100644
--- a/src/PVE/AbstractConfig.pm
+++ b/src/PVE/AbstractConfig.pm
@@ -1014,8 +1014,11 @@ sub snapshot_delete {
);
};
if (my $err = $@) {
- die $err if !$force;
- warn $err;
+ my $volid_key = $class->volid_key();
+ my $volid = $volume->{$volid_key};
+ my $msg = "Removing snapshot '$snapname' from volume $volid failed";
+ die "${msg}, use '--force' to continue removal. Error was: $err" if !$force;
+ warn "${msg}, proceeding because '--force' was specified. Error was: $err";
}
}
--
2.47.3
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-09-19 16:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-19 16:16 [pve-devel] [PATCH-SERIES guest-common 0/3] fix #6808: abstract config: snapshot delete: improve error when snapshot on volume is missing Fiona Ebner
2025-09-19 16:16 ` [pve-devel] [PATCH guest-common 1/3] abstract config: order module imports Fiona Ebner
2025-09-19 16:16 ` [pve-devel] [PATCH guest-common 2/3] abstract config: add missing JSONSchema import Fiona Ebner
2025-09-19 16:16 ` [pve-devel] [PATCH guest-common 3/3] fix #6808: abstract config: snapshot delete: improve error when snapshot on volume is missing Fiona Ebner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox