[pve-devel] [PATCH v2 qemu-server] api: qemu: make resize_vm async close #2315
Oguz Bektas
o.bektas at proxmox.com
Tue Jan 12 12:17:19 CET 2021
hi,
thanks for the fix :)
Tested-by: Oguz Bektas <o.bektas at proxmox.com>
On Tue, Jan 12, 2021 at 12:07:54PM +0100, Hannes Laimer wrote:
> Signed-off-by: Hannes Laimer <h.laimer at 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 at lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>
>
More information about the pve-devel
mailing list