[pve-devel] [PATCH qemu-server 01/15] fix #5985: qmp client: increase timeout for {device, netdev, object}_{add, del} commands

Fiona Ebner f.ebner at proxmox.com
Mon Jun 23 17:44:11 CEST 2025


In the bug report, the user mentioned that 7 seconds was enough. For
the HMP 'drive_add' command, the used timeout is 1 minute and for the
'drive_del' command, the used timeout is 10 minutes, because IO might
need to be finished. While something similar might be true for certain
objects/devices, there were no issues reported with the *_del
operations using the default timeout until now and the callers can
still use a higher timeout if they know the specific device/object
requires it.

Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---
 src/PVE/QMPClient.pm | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/PVE/QMPClient.pm b/src/PVE/QMPClient.pm
index f2d177b6..dec5276d 100644
--- a/src/PVE/QMPClient.pm
+++ b/src/PVE/QMPClient.pm
@@ -118,6 +118,15 @@ sub cmd {
             # the variance for Windows guests can be big. And there might be hook scripts
             # that are executed upon thaw, so use 3 minutes to be on the safe side.
             $timeout = 3 * 60;
+        } elsif (
+            $cmd->{execute} eq 'device_add'
+            || $cmd->{execute} eq 'device_del'
+            || $cmd->{execute} eq 'netdev_add'
+            || $cmd->{execute} eq 'netdev_del'
+            || $cmd->{execute} eq 'object-add'
+            || $cmd->{execute} eq 'object-del'
+        ) {
+            $timeout = 60;
         } elsif (
             $cmd->{execute} eq 'backup-cancel'
             || $cmd->{execute} eq 'blockdev-snapshot-delete-internal-sync'
-- 
2.47.2





More information about the pve-devel mailing list