all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Fabian Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: Re: [pve-devel] [PATCH container] lxc: resize: fix #2790 return message in case of disk already at size
Date: Tue, 11 Aug 2020 09:51:18 +0200	[thread overview]
Message-ID: <532dc0d2-8365-3ba6-144e-ac2c4779f92c@proxmox.com> (raw)
In-Reply-To: <20200810145709.5629-1-a.lauterer@proxmox.com>

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@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 {
> 




  reply	other threads:[~2020-08-11  7:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-10 14:57 Aaron Lauterer
2020-08-11  7:51 ` Fabian Ebner [this message]
2020-08-11  8:15   ` Aaron Lauterer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=532dc0d2-8365-3ba6-144e-ac2c4779f92c@proxmox.com \
    --to=f.ebner@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal