public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Fiona Ebner <f.ebner@proxmox.com>
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	[thread overview]
Message-ID: <20261130105428.49588-5-f.ebner@proxmox.com> (raw)
In-Reply-To: <20261130105428.49588-1-f.ebner@proxmox.com>

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 <f.ebner@proxmox.com>
---
 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





      parent reply	other threads:[~2026-11-30 10:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-30 10:54 [PATCH-SERIES qemu-server v2 0/4] fix #8371: bump timeout for more block QMP commands Fiona Ebner
2026-11-30 10:54 ` [PATCH qemu-server v2 1/4] blockdev: resize: bump timeout for resize QMP command to 10 minutes Fiona Ebner
2026-11-30 10:54 ` [PATCH qemu-server v2 2/4] fix #8371: qmp client: bump timeout for query-block for long-running operations Fiona Ebner
2026-11-30 10:54 ` [PATCH qemu-server v2 3/4] blockdev: detach: allow specifying custom timeout Fiona Ebner
2026-11-30 10:54 ` Fiona Ebner [this message]

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=20261130105428.49588-5-f.ebner@proxmox.com \
    --to=f.ebner@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