all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH qemu-server] qmeventd: also treat 'prelaunch' and 'suspended' states as active
@ 2023-10-10  8:57 Fiona Ebner
  2024-01-16 12:22 ` Fiona Ebner
  2024-04-23 14:47 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 2 replies; 3+ messages in thread
From: Fiona Ebner @ 2023-10-10  8:57 UTC (permalink / raw)
  To: pve-devel

Otherwise, a VM in those states would be terminated after a backup
in handle_qmp_return() with QMP 'quit', which is pretty bad in case
of the 'suspended' state.

Does not change the fact that a VM started in prelaunch mode for
backup is terminated later (that is handled by the Perl code).

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 qmeventd/qmeventd.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/qmeventd/qmeventd.c b/qmeventd/qmeventd.c
index 002b2ac4..d8f3ee72 100644
--- a/qmeventd/qmeventd.c
+++ b/qmeventd/qmeventd.c
@@ -272,8 +272,12 @@ handle_qmp_return(struct Client *client, struct json_object *data, bool error)
     bool active = false;
     if (has_status) {
 	const char *status_str = json_object_get_string(status);
-	active = status_str &&
-	    (!strcmp(status_str, "running") || !strcmp(status_str, "paused"));
+	active = status_str && (
+	    !strcmp(status_str, "running")
+	    || !strcmp(status_str, "paused")
+	    || !strcmp(status_str, "suspended")
+	    || !strcmp(status_str, "prelaunch")
+	);
     }
 
     switch (client->state) {
-- 
2.39.2





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

* Re: [pve-devel] [PATCH qemu-server] qmeventd: also treat 'prelaunch' and 'suspended' states as active
  2023-10-10  8:57 [pve-devel] [PATCH qemu-server] qmeventd: also treat 'prelaunch' and 'suspended' states as active Fiona Ebner
@ 2024-01-16 12:22 ` Fiona Ebner
  2024-04-23 14:47 ` [pve-devel] applied: " Thomas Lamprecht
  1 sibling, 0 replies; 3+ messages in thread
From: Fiona Ebner @ 2024-01-16 12:22 UTC (permalink / raw)
  To: pve-devel

Am 10.10.23 um 10:57 schrieb Fiona Ebner:
> Otherwise, a VM in those states would be terminated after a backup
> in handle_qmp_return() with QMP 'quit', which is pretty bad in case
> of the 'suspended' state.
> 
> Does not change the fact that a VM started in prelaunch mode for
> backup is terminated later (that is handled by the Perl code).
> 
> Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>

Ping




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

* [pve-devel] applied: [PATCH qemu-server] qmeventd: also treat 'prelaunch' and 'suspended' states as active
  2023-10-10  8:57 [pve-devel] [PATCH qemu-server] qmeventd: also treat 'prelaunch' and 'suspended' states as active Fiona Ebner
  2024-01-16 12:22 ` Fiona Ebner
@ 2024-04-23 14:47 ` Thomas Lamprecht
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Lamprecht @ 2024-04-23 14:47 UTC (permalink / raw)
  To: Proxmox VE development discussion, Fiona Ebner

Am 10/10/2023 um 10:57 schrieb Fiona Ebner:
> Otherwise, a VM in those states would be terminated after a backup
> in handle_qmp_return() with QMP 'quit', which is pretty bad in case
> of the 'suspended' state.
> 
> Does not change the fact that a VM started in prelaunch mode for
> backup is terminated later (that is handled by the Perl code).
> 
> Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
> ---
>  qmeventd/qmeventd.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
>

applied, thanks!


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


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

end of thread, other threads:[~2024-04-23 14:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-10  8:57 [pve-devel] [PATCH qemu-server] qmeventd: also treat 'prelaunch' and 'suspended' states as active Fiona Ebner
2024-01-16 12:22 ` Fiona Ebner
2024-04-23 14:47 ` [pve-devel] applied: " Thomas Lamprecht

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