From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 49C021FF0B3 for ; Wed, 28 Oct 2026 10:39:39 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 8DFC521260; Wed, 28 Oct 2026 10:39:36 +0100 (CET) Message-ID: <5643ff55-0abb-4ec3-b21d-61c4e076d78e@proxmox.com> Date: Wed, 28 Oct 2026 10:39:31 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH qemu-server 4/4] clone disk: bump timeout for querying target volume size to 1 minute To: Elias Huhsovitz , pve-devel@lists.proxmox.com References: <20261022093901.52732-1-f.ebner@proxmox.com> <20261022093901.52732-5-f.ebner@proxmox.com> Content-Language: en-US From: Fiona Ebner In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1793180371432 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.338 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) 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 Message-ID-Hash: B45BN5LMIPQBZKS6DFURJ2NECKCRUVSL X-Message-ID-Hash: B45BN5LMIPQBZKS6DFURJ2NECKCRUVSL X-MailFrom: f.ebner@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Am 23.10.26 um 11:31 AM schrieb Elias Huhsovitz: > On Thu Oct 22, 2026 at 11:38 AM CEST, Fiona Ebner wrote: >> Since commit "fix #8209: clone disk: do not ignore failure to query >> size of target", failure to query the size of the target volume after >> clone is no longer quietly ignored. Bump the timeout to reduce the >> likelyhood of harmless timeouts causing a warning. Print a message to >> communicate that the query is happening to the user. >> >> Signed-off-by: Fiona Ebner >> --- >> src/PVE/QemuServer.pm | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm >> index 4b7351b3..0f8aef6f 100644 >> --- a/src/PVE/QemuServer.pm >> +++ b/src/PVE/QemuServer.pm >> @@ -7931,7 +7931,8 @@ sub clone_disk { >> } >> >> my $result = {}; >> - my $size = eval { PVE::Storage::volume_size_info($storecfg, $newvolid, 10) }; >> + print "querying size of target volume '$newvolid' after copy..\n"; > > nit: IMO the message should say: 'after clone...', since we are calling > PVE::Storage::vdisk_clone. The message is user-facing, so it does not matter what the function in Perl is called. But we do log "create full|linked clone of drive ..." in the beginning of the function, so I'll change it to be consistent with that :) > > super nit: i think it should be three dots (...), instead of 2 (..) ;) We do have quite some instances with .. but I'll change it. > >> + my $size = eval { PVE::Storage::volume_size_info($storecfg, $newvolid, 60) }; > > nit: The timeout is inconsistent with the volume_size_info() call on > line 7897. There it is still 10 seconds. I am not sure if we can > gurantee that querying the source volume is always faster than querying > the target volume. That's fair, especially since there can be multiple disks involved in a full guest clone. I'll bump it there too. > general: Tbh I am not sure that a generic timeout is the optimal > long-term solution here. I feel like the timeout should be storage > specific. E.g., an incrased timeout of 60 seconds for a NFS, but keep > the 10 seconds for a local ZFS. I don't think we should try to predict how fast a storage "should" be based on the plugin type. That depends much more on the hardware/workloads. Also, clone is already a long-running operation and failure can be a lot of wasted work, so I don't think trying to "optimize" the tolerated timeout would be useful. If a storage is fast, it will just not run into the timeout; if it is slow, the larger timeout is beneficial; if it is usually fast, but not right now, it is still beneficial to have the larger timeout. > > But for now, the incrased timeout is fine. > >> my $err = $@; >> $err = "no size in result" if !$err && !$size; >> if ($err) { >