public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH-SERIES qemu-server] small improvements in QMP client module
@ 2024-02-09 12:14 Fiona Ebner
  2024-02-09 12:14 ` [pve-devel] [PATCH qemu-server 1/4] QMP client: increase default timeout for drive-mirror to 10 minutes Fiona Ebner
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Fiona Ebner @ 2024-02-09 12:14 UTC (permalink / raw)
  To: pve-devel

First patch is the only change in behavior, rest is cleanups.

Fiona Ebner (4):
  QMP client: increase default timeout for drive-mirror to 10 minutes
  QMP client: remove unnecessary question mark from comment
  QMP client: add missing use statement
  QMP client: code cleanup: sort commands with 10 minutes timeout
    alphabetically

 PVE/QMPClient.pm | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

-- 
2.39.2





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

* [pve-devel] [PATCH qemu-server 1/4] QMP client: increase default timeout for drive-mirror to 10 minutes
  2024-02-09 12:14 [pve-devel] [PATCH-SERIES qemu-server] small improvements in QMP client module Fiona Ebner
@ 2024-02-09 12:14 ` Fiona Ebner
  2024-02-09 12:14 ` [pve-devel] [PATCH qemu-server 2/4] QMP client: remove unnecessary question mark from comment Fiona Ebner
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Fiona Ebner @ 2024-02-09 12:14 UTC (permalink / raw)
  To: pve-devel

like for other block operations.

Reported in the community forum:
https://forum.proxmox.com/threads/141238/

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

diff --git a/PVE/QMPClient.pm b/PVE/QMPClient.pm
index ef5c19b3..0a35db74 100644
--- a/PVE/QMPClient.pm
+++ b/PVE/QMPClient.pm
@@ -121,6 +121,7 @@ sub cmd {
 	    $cmd->{execute} eq 'savevm-start' ||
 	    $cmd->{execute} eq 'savevm-end' ||
 	    $cmd->{execute} eq 'query-backup' ||
+	    $cmd->{execute} eq 'drive-mirror' ||
 	    $cmd->{execute} eq 'query-block-jobs' ||
 	    $cmd->{execute} eq 'block-job-cancel' ||
 	    $cmd->{execute} eq 'block-job-complete' ||
-- 
2.39.2





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

* [pve-devel] [PATCH qemu-server 2/4] QMP client: remove unnecessary question mark from comment
  2024-02-09 12:14 [pve-devel] [PATCH-SERIES qemu-server] small improvements in QMP client module Fiona Ebner
  2024-02-09 12:14 ` [pve-devel] [PATCH qemu-server 1/4] QMP client: increase default timeout for drive-mirror to 10 minutes Fiona Ebner
@ 2024-02-09 12:14 ` Fiona Ebner
  2024-02-09 12:14 ` [pve-devel] [PATCH qemu-server 3/4] QMP client: add missing use statement Fiona Ebner
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Fiona Ebner @ 2024-02-09 12:14 UTC (permalink / raw)
  To: pve-devel

There might've been a question back when it got first added in commit
9d689077 ("use long timeouts for snapshot monitor command"). But
nowadays, the value is well-established. Changing it would affect
quite a few operations, so that should not be done without good
reason and is likely better done for the specific operation.

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

diff --git a/PVE/QMPClient.pm b/PVE/QMPClient.pm
index 0a35db74..42e54f01 100644
--- a/PVE/QMPClient.pm
+++ b/PVE/QMPClient.pm
@@ -132,7 +132,7 @@ sub cmd {
 	    $cmd->{execute} eq 'blockdev-snapshot-internal-sync' ||
 	    $cmd->{execute} eq 'blockdev-snapshot-delete-internal-sync'
 	 ) {
-	    $timeout = 10*60; # 10 mins ?
+	    $timeout = 10*60; # 10 mins
 	} else {
 	    #  NOTE: if you came here as user and want to change this, try using IO-Threads first
 	    # which move out quite some processing of the main thread, leaving more time for QMP
-- 
2.39.2





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

* [pve-devel] [PATCH qemu-server 3/4] QMP client: add missing use statement
  2024-02-09 12:14 [pve-devel] [PATCH-SERIES qemu-server] small improvements in QMP client module Fiona Ebner
  2024-02-09 12:14 ` [pve-devel] [PATCH qemu-server 1/4] QMP client: increase default timeout for drive-mirror to 10 minutes Fiona Ebner
  2024-02-09 12:14 ` [pve-devel] [PATCH qemu-server 2/4] QMP client: remove unnecessary question mark from comment Fiona Ebner
@ 2024-02-09 12:14 ` Fiona Ebner
  2024-02-09 12:14 ` [pve-devel] [RFC qemu-server 4/4] QMP client: code cleanup: sort commands with 10 minutes timeout alphabetically Fiona Ebner
  2024-03-08 13:48 ` [pve-devel] applied-series: [PATCH-SERIES qemu-server] small improvements in QMP client module Thomas Lamprecht
  4 siblings, 0 replies; 6+ messages in thread
From: Fiona Ebner @ 2024-02-09 12:14 UTC (permalink / raw)
  To: pve-devel

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

diff --git a/PVE/QMPClient.pm b/PVE/QMPClient.pm
index 42e54f01..4c025b36 100644
--- a/PVE/QMPClient.pm
+++ b/PVE/QMPClient.pm
@@ -4,6 +4,7 @@ use strict;
 use warnings;
 
 use IO::Multiplex;
+use IO::Socket::UNIX;
 use JSON;
 use POSIX qw(EINTR EAGAIN);
 use Scalar::Util qw(weaken);
-- 
2.39.2





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

* [pve-devel] [RFC qemu-server 4/4] QMP client: code cleanup: sort commands with 10 minutes timeout alphabetically
  2024-02-09 12:14 [pve-devel] [PATCH-SERIES qemu-server] small improvements in QMP client module Fiona Ebner
                   ` (2 preceding siblings ...)
  2024-02-09 12:14 ` [pve-devel] [PATCH qemu-server 3/4] QMP client: add missing use statement Fiona Ebner
@ 2024-02-09 12:14 ` Fiona Ebner
  2024-03-08 13:48 ` [pve-devel] applied-series: [PATCH-SERIES qemu-server] small improvements in QMP client module Thomas Lamprecht
  4 siblings, 0 replies; 6+ messages in thread
From: Fiona Ebner @ 2024-02-09 12:14 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---

It's kind of grouped by related operations right now, but not
consistently. Making it consistent and sorting the groups is a
potential alternative.

 PVE/QMPClient.pm | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/PVE/QMPClient.pm b/PVE/QMPClient.pm
index 4c025b36..a785d9a1 100644
--- a/PVE/QMPClient.pm
+++ b/PVE/QMPClient.pm
@@ -119,19 +119,19 @@ sub cmd {
 	    # that are executed upon thaw, so use 3 minutes to be on the safe side.
 	    $timeout = 3 * 60;
 	} elsif (
-	    $cmd->{execute} eq 'savevm-start' ||
-	    $cmd->{execute} eq 'savevm-end' ||
-	    $cmd->{execute} eq 'query-backup' ||
-	    $cmd->{execute} eq 'drive-mirror' ||
-	    $cmd->{execute} eq 'query-block-jobs' ||
+	    $cmd->{execute} eq 'backup-cancel' ||
+	    $cmd->{execute} eq 'blockdev-snapshot-delete-internal-sync' ||
+	    $cmd->{execute} eq 'blockdev-snapshot-internal-sync' ||
 	    $cmd->{execute} eq 'block-job-cancel' ||
 	    $cmd->{execute} eq 'block-job-complete' ||
-	    $cmd->{execute} eq 'backup-cancel' ||
-	    $cmd->{execute} eq 'query-savevm' ||
+	    $cmd->{execute} eq 'drive-mirror' ||
 	    $cmd->{execute} eq 'guest-fstrim' ||
 	    $cmd->{execute} eq 'guest-shutdown' ||
-	    $cmd->{execute} eq 'blockdev-snapshot-internal-sync' ||
-	    $cmd->{execute} eq 'blockdev-snapshot-delete-internal-sync'
+	    $cmd->{execute} eq 'query-backup' ||
+	    $cmd->{execute} eq 'query-block-jobs' ||
+	    $cmd->{execute} eq 'query-savevm' ||
+	    $cmd->{execute} eq 'savevm-end' ||
+	    $cmd->{execute} eq 'savevm-start'
 	 ) {
 	    $timeout = 10*60; # 10 mins
 	} else {
-- 
2.39.2





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

* [pve-devel] applied-series: [PATCH-SERIES qemu-server] small improvements in QMP client module
  2024-02-09 12:14 [pve-devel] [PATCH-SERIES qemu-server] small improvements in QMP client module Fiona Ebner
                   ` (3 preceding siblings ...)
  2024-02-09 12:14 ` [pve-devel] [RFC qemu-server 4/4] QMP client: code cleanup: sort commands with 10 minutes timeout alphabetically Fiona Ebner
@ 2024-03-08 13:48 ` Thomas Lamprecht
  4 siblings, 0 replies; 6+ messages in thread
From: Thomas Lamprecht @ 2024-03-08 13:48 UTC (permalink / raw)
  To: Proxmox VE development discussion, Fiona Ebner

Am 09/02/2024 um 13:14 schrieb Fiona Ebner:
> First patch is the only change in behavior, rest is cleanups.
> 
> Fiona Ebner (4):
>   QMP client: increase default timeout for drive-mirror to 10 minutes
>   QMP client: remove unnecessary question mark from comment
>   QMP client: add missing use statement
>   QMP client: code cleanup: sort commands with 10 minutes timeout
>     alphabetically
> 
>  PVE/QMPClient.pm | 20 +++++++++++---------
>  1 file changed, 11 insertions(+), 9 deletions(-)
> 


applied series, thanks!




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

end of thread, other threads:[~2024-03-08 13:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-09 12:14 [pve-devel] [PATCH-SERIES qemu-server] small improvements in QMP client module Fiona Ebner
2024-02-09 12:14 ` [pve-devel] [PATCH qemu-server 1/4] QMP client: increase default timeout for drive-mirror to 10 minutes Fiona Ebner
2024-02-09 12:14 ` [pve-devel] [PATCH qemu-server 2/4] QMP client: remove unnecessary question mark from comment Fiona Ebner
2024-02-09 12:14 ` [pve-devel] [PATCH qemu-server 3/4] QMP client: add missing use statement Fiona Ebner
2024-02-09 12:14 ` [pve-devel] [RFC qemu-server 4/4] QMP client: code cleanup: sort commands with 10 minutes timeout alphabetically Fiona Ebner
2024-03-08 13:48 ` [pve-devel] applied-series: [PATCH-SERIES qemu-server] small improvements in QMP client module Thomas Lamprecht

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