]> git.proxmox.com Git - pve-container.git/commitdiff
error when failing to extract rather than warn
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Fri, 20 Nov 2015 12:39:24 +0000 (13:39 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 20 Nov 2015 14:13:05 +0000 (15:13 +0100)
src/PVE/LXC/Create.pm

index 58db2d24175486260e4e5e4da5ae5ce211d17219..014eaa0c571bbe2661daefc4b23a4e34bd2e0818 100644 (file)
@@ -212,14 +212,10 @@ sub create_rootfs {
        my $rootdir = PVE::LXC::mount_all($vmid, $storage_cfg, $conf);
         restore_and_configure($vmid, $archive, $rootdir, $conf, $password, $restore);
     };
-    if (my $err = $@) {
-       warn $err;
-       PVE::LXC::umount_all($vmid, $storage_cfg, $conf, 1);
-    } else {
-       PVE::LXC::umount_all($vmid, $storage_cfg, $conf, 0);
-    }
-
+    my $err = $@;
+    PVE::LXC::umount_all($vmid, $storage_cfg, $conf, $err ? 1 : 0);
     PVE::Storage::deactivate_volumes($storage_cfg, PVE::LXC::get_vm_volumes($conf));
+    die $err if $err;
 }
 
 1;