[pve-devel] [PATCH qemu-server 2/2] qmp client: add default timeouts for more blockdev commands

Fiona Ebner f.ebner at proxmox.com
Thu Dec 12 11:02:47 CET 2024


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. Use the same for 'blockdev-add' respectively
'blockdev-del'.

For 'drive-mirror', 10 minutes is used, so use the same for
'blockdev-mirror'.

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

diff --git a/PVE/QMPClient.pm b/PVE/QMPClient.pm
index b03f1da8..5fa8b815 100644
--- a/PVE/QMPClient.pm
+++ b/PVE/QMPClient.pm
@@ -119,6 +119,7 @@ sub cmd {
 	    # that are executed upon thaw, so use 3 minutes to be on the safe side.
 	    $timeout = 3 * 60;
 	} elsif (
+	    $cmd->{execute} eq 'blockdev-add' ||
 	    $cmd->{execute} eq 'device_add' ||
 	    $cmd->{execute} eq 'device_del' ||
 	    $cmd->{execute} eq 'netdev_add' ||
@@ -129,6 +130,8 @@ sub cmd {
 	    $timeout = 60;
 	} elsif (
 	    $cmd->{execute} eq 'backup-cancel' ||
+	    $cmd->{execute} eq 'blockdev-del' ||
+	    $cmd->{execute} eq 'blockdev-mirror' ||
 	    $cmd->{execute} eq 'blockdev-snapshot-delete-internal-sync' ||
 	    $cmd->{execute} eq 'blockdev-snapshot-internal-sync' ||
 	    $cmd->{execute} eq 'block-job-cancel' ||
-- 
2.39.5





More information about the pve-devel mailing list