public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Oguz Bektas <o.bektas@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH v2 qemu-server] api: qemu: make resize_vm async close #2315
Date: Tue, 12 Jan 2021 12:17:19 +0100	[thread overview]
Message-ID: <20210112111719.GA8806@gaia.proxmox.com> (raw)
In-Reply-To: <20210112110754.168177-1-h.laimer@proxmox.com>

hi,

thanks for the fix :)

Tested-by: Oguz Bektas <o.bektas@proxmox.com>


On Tue, Jan 12, 2021 at 12:07:54PM +0100, Hannes Laimer wrote:
> Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
> ---
> Resize is now done in a task.
> 
> v1 -> v2: pass code that should be executed correctly to fork_worker
> 
>  PVE/API2/Qemu.pm | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
> index e8de4ea..0c5d50c 100644
> --- a/PVE/API2/Qemu.pm
> +++ b/PVE/API2/Qemu.pm
> @@ -3730,7 +3730,7 @@ __PACKAGE__->register_method({
>  	    },
>  	},
>      },
> -    returns => { type => 'null'},
> +    returns => { type => 'string'},
>      code => sub {
>          my ($param) = @_;
>  
> @@ -3816,9 +3816,10 @@ __PACKAGE__->register_method({
>  
>  	    PVE::QemuConfig->write_config($vmid, $conf);
>  	};
> -
> -        PVE::QemuConfig->lock_config($vmid, $updatefn);
> -        return;
> +	my $worker = sub {
> +	    PVE::QemuConfig->lock_config($vmid, $updatefn);
> +	};
> +	return $rpcenv->fork_worker('qmresize', $vmid, $authuser, $worker);
>      }});
>  
>  __PACKAGE__->register_method({
> -- 
> 2.20.1
> 
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> 
> 




  reply	other threads:[~2021-01-12 11:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-12 11:07 Hannes Laimer
2021-01-12 11:17 ` Oguz Bektas [this message]
2021-01-12 11:24 ` Thomas Lamprecht

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=20210112111719.GA8806@gaia.proxmox.com \
    --to=o.bektas@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal