From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 2A84E6747B for ; Tue, 12 Jan 2021 12:20:41 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 2864623F35 for ; Tue, 12 Jan 2021 12:20:41 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 5DA9223F2B for ; Tue, 12 Jan 2021 12:20:40 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 24BDF44BF6 for ; Tue, 12 Jan 2021 12:20:40 +0100 (CET) To: Proxmox VE development discussion , Hannes Laimer References: <20210112094436.136048-1-h.laimer@proxmox.com> From: Thomas Lamprecht Message-ID: Date: Tue, 12 Jan 2021 12:20:39 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:84.0) Gecko/20100101 Thunderbird/84.0 MIME-Version: 1.0 In-Reply-To: <20210112094436.136048-1-h.laimer@proxmox.com> Content-Type: text/plain; charset=UTF-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-SPAM-LEVEL: Spam detection results: 0 AWL -0.319 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment KAM_NUMSUBJECT 0.5 Subject ends in numbers excluding current years NICE_REPLY_A -0.001 Looks like a legit reply (A) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [proxmox.com, qemu.pm] Subject: Re: [pve-devel] [PATCH qemu-server] api: qemu: make resize_vm async close #2315 X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 11:20:41 -0000 On 12.01.21 10:44, Hannes Laimer wrote: > Signed-off-by: Hannes Laimer > --- > Resizing is now done asynchronous in a task. seems like an API change, doesn't it? Maybe (did not checked) we could add an "async" boolean param and make the return type a optional string, = can you please check if that would work and stay compatible as long as async = is not passed as true. Then there are again a few cosmetic, but still important, issues: * even if it's rather obvious the cost adding something like: "resize can easily hang for a longer time depending on underlying stora= ge and load" is almost zero (takes <10 seconds of one person) and can only= help to avoid people going to the b * place the "fix #2315:" first https://pve.proxmox.com/wiki/Developer_Documentation#Commits_and_Commit= _Messages * replace the "qemu:" with "disk:", as we're in the qemu-server repositor= y the "qemu" doesn't adds much informational value here (like it would in= the, e.g., pve-manager one). thanks! >=20 > PVE/API2/Qemu.pm | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) >=20 > diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm > index e8de4ea..379f34a 100644 > --- a/PVE/API2/Qemu.pm > +++ b/PVE/API2/Qemu.pm > @@ -3730,7 +3730,7 @@ __PACKAGE__->register_method({ > }, > }, > }, > - returns =3D> { type =3D> 'null'}, > + returns =3D> { type =3D> 'string'}, > code =3D> sub { > my ($param) =3D @_; > =20 > @@ -3817,8 +3817,7 @@ __PACKAGE__->register_method({ > PVE::QemuConfig->write_config($vmid, $conf); > }; > =20 > - PVE::QemuConfig->lock_config($vmid, $updatefn); > - return; > + return $rpcenv->fork_worker('qmresize', $vmid, $authuser, PVE::QemuCo= nfig->lock_config($vmid, $updatefn)); > }}); > =20 > __PACKAGE__->register_method({ >=20