[pve-devel] [PATCH container] lxc: resize: fix #2790 return message in case of disk already at size

Fabian Ebner f.ebner at proxmox.com
Tue Aug 11 09:51:18 CEST 2020


The returned string is supposed to be a task ID. If some other kind of 
string is returned, could this cause any problems?

Am 10.08.20 um 16:57 schrieb Aaron Lauterer:
> Otherwise the API would return an error message because the schema
> defines a return of type string which wasn't provided.
> 
> Signed-off-by: Aaron Lauterer <a.lauterer at proxmox.com>
> ---
> 
> We should probably align the resize endpoint on the qemu side
> accordingly.
> 
>   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..bcac8e2 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;
> +	    return 'disk is already at specified size' if $size == $newsize;
>   
>   	    PVE::Cluster::log_msg('info', $authuser, "update CT $vmid: resize --disk $disk --size $sizestr");
>   	    my $realcmd = sub {
> 





More information about the pve-devel mailing list