From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id CB6341FF0B7 for ; Mon, 30 Nov 2026 11:54:44 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 1A78B21733; Mon, 30 Nov 2026 11:54:36 +0100 (CET) From: Fiona Ebner To: pve-devel@lists.proxmox.com Subject: [PATCH qemu-server v2 4/4] qmp client: bump timeout for query-named-block-nodes for long-running operations Date: Mon, 30 Nov 2026 11:54:17 +0100 Message-ID: <20261130105428.49588-5-f.ebner@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261130105428.49588-1-f.ebner@proxmox.com> References: <20261130105428.49588-1-f.ebner@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1796036071647 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.240 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: FWB5WA5YDBRZAKUTG65KBYN3CRVSKMM7 X-Message-ID-Hash: FWB5WA5YDBRZAKUTG65KBYN3CRVSKMM7 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: Following patch "fix #8371: qmp client: bump timeout for query-block for long-running operations", now for 'query-named-block-nodes'. The same reasoning applies. The 'query-named-block-nodes' QMP command can do IO on the underlying storage, for example via .bdrv_co_get_allocated_file_size(), so can take some time. Use the same timeout as for other block operations. The command is reached during blockdev_replace(), live import/restore, backup, drive mirror, commit, stream, VM destroy, etc. which are all long-running operations. The two exceptions are qemu_drivedel() and blockdev_change_medium(), which are called during short-running hotunplug/medium change operations, so preserve the timeout of 5 seconds for those. Signed-off-by: Fiona Ebner --- src/PVE/QMPClient.pm | 1 + src/PVE/QemuServer.pm | 2 +- src/PVE/QemuServer/Blockdev.pm | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/PVE/QMPClient.pm b/src/PVE/QMPClient.pm index 9c1429c9..6d31bd5f 100644 --- a/src/PVE/QMPClient.pm +++ b/src/PVE/QMPClient.pm @@ -160,6 +160,7 @@ sub cmd { || $cmd->{execute} eq 'query-backup' || $cmd->{execute} eq 'query-block' || $cmd->{execute} eq 'query-block-jobs' + || $cmd->{execute} eq 'query-named-block-nodes' || $cmd->{execute} eq 'query-savevm' || $cmd->{execute} eq 'savevm-end' || $cmd->{execute} eq 'savevm-start' diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm index 3c4cbcc9..d7ba41f7 100644 --- a/src/PVE/QemuServer.pm +++ b/src/PVE/QemuServer.pm @@ -4106,7 +4106,7 @@ sub qemu_drivedel { PVE::QemuServer::Blockdev::detach( vm_qmp_peer($vmid), "drive-$deviceid", - { 'follow-backing' => 1 }, + { 'follow-backing' => 1, 'query-timeout' => 5 }, ); return 1; } else { diff --git a/src/PVE/QemuServer/Blockdev.pm b/src/PVE/QemuServer/Blockdev.pm index 9aac912d..363796cb 100644 --- a/src/PVE/QemuServer/Blockdev.pm +++ b/src/PVE/QemuServer/Blockdev.pm @@ -762,7 +762,7 @@ my sub blockdev_change_medium { # force eject if locked mon_cmd($vmid, "blockdev-open-tray", force => JSON::true, id => "$qdev_id"); mon_cmd($vmid, "blockdev-remove-medium", id => "$qdev_id"); - detach(vm_qmp_peer($vmid), "drive-$qdev_id"); + detach(vm_qmp_peer($vmid), "drive-$qdev_id", { 'query-timeout' => 5 }); return if $drive->{file} eq 'none'; -- 2.47.3