This check ensures that disks aren't unintentionally shrunken, if the
size is zero due to an underlying problem.
---
src/PVE/API2/LXC.pm | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm
index faec445..fbc4659 100644
--- a/src/PVE/API2/LXC.pm
+++ b/src/PVE/API2/LXC.pm
@@ -1639,6 +1639,9 @@ __PACKAGE__->register_method({
PVE::Storage::activate_volumes($storage_cfg, [$volid]);
my $size = PVE::Storage::volume_size_info($storage_cfg, $volid, 5);
+
+ die "Size of volume $volid couldn't be determined\n" if
(!defined($size));
+
$newsize += $size if $ext;
$newsize = int($newsize);
--
2.20.1
_______________________________________________
pve-devel mailing list
[email protected]
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel