* [pve-devel] [PATCH qemu-server 1/2] fix #5985: qmp client: increase timeout for {device, netdev, object}_{add, del} commands
@ 2024-12-12 10:02 Fiona Ebner
2024-12-12 10:02 ` [pve-devel] [PATCH qemu-server 2/2] qmp client: add default timeouts for more blockdev commands Fiona Ebner
0 siblings, 1 reply; 2+ messages in thread
From: Fiona Ebner @ 2024-12-12 10:02 UTC (permalink / raw)
To: pve-devel
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@proxmox.com>
---
PVE/QMPClient.pm | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/PVE/QMPClient.pm b/PVE/QMPClient.pm
index abed1f01..b03f1da8 100644
--- a/PVE/QMPClient.pm
+++ b/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.39.5
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* [pve-devel] [PATCH qemu-server 2/2] qmp client: add default timeouts for more blockdev commands
2024-12-12 10:02 [pve-devel] [PATCH qemu-server 1/2] fix #5985: qmp client: increase timeout for {device, netdev, object}_{add, del} commands Fiona Ebner
@ 2024-12-12 10:02 ` Fiona Ebner
0 siblings, 0 replies; 2+ messages in thread
From: Fiona Ebner @ 2024-12-12 10:02 UTC (permalink / raw)
To: pve-devel
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@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
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-12-12 10:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-12 10:02 [pve-devel] [PATCH qemu-server 1/2] fix #5985: qmp client: increase timeout for {device, netdev, object}_{add, del} commands Fiona Ebner
2024-12-12 10:02 ` [pve-devel] [PATCH qemu-server 2/2] qmp client: add default timeouts for more blockdev commands Fiona Ebner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox