From 5c36822a318f6fb5e912d5257bc6af00804a9bc3 Mon Sep 17 00:00:00 2001 From: Aaron Lauterer Date: Wed, 26 Aug 2020 10:51:26 +0200 Subject: [PATCH] lxc: resize: fix #2790 return message in case of disk already at size Otherwise the API would return an error message because returning an empty value is not defined in the API. By dying we avoid confusions as the return will be an error and not a successful call which should return a task ID. Signed-off-by: Aaron Lauterer --- src/PVE/API2/LXC.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm index 21899d0..ced3093 100644 --- a/src/PVE/API2/LXC.pm +++ b/src/PVE/API2/LXC.pm @@ -1674,7 +1674,7 @@ __PACKAGE__->register_method({ die "unable to shrink disk size\n" if $newsize < $size; - return if $size == $newsize; + die "disk is already at specified size\n" if $size == $newsize; PVE::Cluster::log_msg('info', $authuser, "update CT $vmid: resize --disk $disk --size $sizestr"); my $realcmd = sub { -- 2.39.5