all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH qemu-server] fix #8371: qmp client: bump timeout for query-block for long-running operations
@ 2026-11-24 13:32 Fiona Ebner
  2026-11-30 10:55 ` superseded: " Fiona Ebner
  0 siblings, 1 reply; 2+ messages in thread
From: Fiona Ebner @ 2026-11-24 13:32 UTC (permalink / raw)
  To: pve-devel

The 'query-block' 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 call is
reached during blockdev_replace(), live import/restore, backup, drive
mirror, setting up NBD exports on the migration target, as well as
block resize, which are all long-running operations. The only
exception is vm_devices_list(), which is called during a short-running
hotplug operation, so preserve the timeout of 5 seconds for that.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 src/PVE/QMPClient.pm  | 1 +
 src/PVE/QemuServer.pm | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/PVE/QMPClient.pm b/src/PVE/QMPClient.pm
index 607aec6b..c926ef31 100644
--- a/src/PVE/QMPClient.pm
+++ b/src/PVE/QMPClient.pm
@@ -157,6 +157,7 @@ sub cmd {
             || $cmd->{execute} eq 'guest-fstrim'
             || $cmd->{execute} eq 'guest-shutdown'
             || $cmd->{execute} eq 'query-backup'
+            || $cmd->{execute} eq 'query-block'
             || $cmd->{execute} eq 'query-block-jobs'
             || $cmd->{execute} eq 'query-savevm'
             || $cmd->{execute} eq 'savevm-end'
diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm
index ecbaa27f..3c4cbcc9 100644
--- a/src/PVE/QemuServer.pm
+++ b/src/PVE/QemuServer.pm
@@ -3850,7 +3850,7 @@ sub vm_devices_list {
 
     # Block device IDs need to be checked at the qdev level, since with '-blockdev', the 'device'
     # property will not be set.
-    my $resblock = mon_cmd($vmid, 'query-block');
+    my $resblock = mon_cmd($vmid, 'query-block', timeout => 5);
     for my $block ($resblock->@*) {
         my $qdev_id = $block->{qdev} or next;
         my $drive_id = PVE::QemuServer::Blockdev::qdev_id_to_drive_id($qdev_id);
-- 
2.47.3





^ permalink raw reply related	[flat|nested] 2+ messages in thread

* superseded: [PATCH qemu-server] fix #8371: qmp client: bump timeout for query-block for long-running operations
  2026-11-24 13:32 [PATCH qemu-server] fix #8371: qmp client: bump timeout for query-block for long-running operations Fiona Ebner
@ 2026-11-30 10:55 ` Fiona Ebner
  0 siblings, 0 replies; 2+ messages in thread
From: Fiona Ebner @ 2026-11-30 10:55 UTC (permalink / raw)
  To: pve-devel

superseded-by:
https://lore.proxmox.com/pve-devel/20261130105428.49588-1-f.ebner@proxmox.com/





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-30 10:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-24 13:32 [PATCH qemu-server] fix #8371: qmp client: bump timeout for query-block for long-running operations Fiona Ebner
2026-11-30 10:55 ` superseded: " Fiona Ebner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal