In case a cleanup worker is spawned, the error from the eval block for allocation was lost. Save it in a variable for checking later.
Signed-off-by: Fiona Ebner <[email protected]> --- 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 24f2534..f5a2008 100644 --- a/src/PVE/Storage/LVMPlugin.pm +++ b/src/PVE/Storage/LVMPlugin.pm @@ -1097,11 +1097,12 @@ sub volume_snapshot_rollback { die "error deleting snapshot $snap $@\n" if $@; eval { alloc_snap_image($class, $storeid, $scfg, $volname, $snap) }; + my $alloc_err = $@; fork_cleanup_worker($cleanup_worker); - if ($@) { - die "can't allocate new volume $volname: $@\n"; + if ($alloc_err) { + die "can't allocate new volume $volname: $alloc_err\n"; } return undef; -- 2.47.3 _______________________________________________ pve-devel mailing list [email protected] https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
