public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH storage] lvm plugin: snapshot: don't quietly ignore failure to rename back to original
@ 2026-09-16 13:22 Fiona Ebner
  2026-10-04 19:33 ` applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Fiona Ebner @ 2026-09-16 13:22 UTC (permalink / raw)
  To: pve-devel

In case the new top volume cannot be allocated, an error for renaming
back to the original name was quietly ignored. Log it as a task
warning, because this is important.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 src/PVE/Storage/LVMPlugin.pm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/PVE/Storage/LVMPlugin.pm b/src/PVE/Storage/LVMPlugin.pm
index 67ba0f7..62f7997 100644
--- a/src/PVE/Storage/LVMPlugin.pm
+++ b/src/PVE/Storage/LVMPlugin.pm
@@ -9,6 +9,7 @@ use IO::File;
 use JSON;
 
 use PVE::JSONSchema qw(get_standard_option);
+use PVE::RESTEnvironment qw(log_warn);
 use PVE::Tools qw(run_command file_read_firstline trim);
 
 use PVE::Storage::Common;
@@ -1136,9 +1137,9 @@ my sub volume_snapshot_locked {
     die "error rename $volname to $snap - $@\n" if $@;
 
     eval { alloc_snap_image($class, $storeid, $scfg, $volname, $snap) };
-    if ($@) {
-        my $err = $@;
+    if (my $err = $@) {
         eval { $class->rename_snapshot($scfg, $storeid, $volname, $snap, 'current') };
+        log_warn("unable to rename $snap back to to $volname - $@") if $@;
         die $err;
     }
 }
-- 
2.47.3





^ permalink raw reply related	[flat|nested] 2+ messages in thread

* applied: [PATCH storage] lvm plugin: snapshot: don't quietly ignore failure to rename back to original
  2026-09-16 13:22 [PATCH storage] lvm plugin: snapshot: don't quietly ignore failure to rename back to original Fiona Ebner
@ 2026-10-04 19:33 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2026-10-04 19:33 UTC (permalink / raw)
  To: pve-devel, Fiona Ebner

On Wed, 16 Sep 2026 15:22:30 +0200, Fiona Ebner wrote:
> In case the new top volume cannot be allocated, an error for renaming
> back to the original name was quietly ignored. Log it as a task
> warning, because this is important.

Applied, thanks!

[1/1] lvm plugin: snapshot: don't quietly ignore failure to rename back to original
      https://git.proxmox.com/?p=pve-storage.git;a=commitdiff;h=f42f117b293deee376a84ccf0aeccefed231dfd2




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-10-04 19:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-16 13:22 [PATCH storage] lvm plugin: snapshot: don't quietly ignore failure to rename back to original Fiona Ebner
2026-10-04 19:33 ` applied: " Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal