* [pve-devel] [PATCH qemu-server] vm status: make sure disk{read, write} adhere to return schema to fix regression for PDM
@ 2025-10-22 10:41 Fiona Ebner
2025-10-22 11:50 ` [pve-devel] applied: " Fabian Grünbichler
0 siblings, 1 reply; 2+ messages in thread
From: Fiona Ebner @ 2025-10-22 10:41 UTC (permalink / raw)
To: pve-devel
As reported in the community forum [0], Proxmox Datacenter Manager
will fail to handle the result of the status API call for a shut down
VM. The reason is that the return schema requires having an integer
return value for disk{read,write}, so an explicit undef is not
allowed. However, the properties are optional and are not relevant for
a shut down guest, so just don't set them at all if no value was
queried. This also makes sure that bug #6207 does not reappear. Note
that pvestatd would already not consider the value for shut down VMs
and treats the value not being present and the value being an explicit
undef the same, see update_qemu_status() in pvestatd.pm.
[0]: https://forum.proxmox.com/threads/160166/post-809901
Fixes: 528df523 ("fix #6207: vm status: return undef values when disk{read, write} cannot be queried")
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
src/PVE/QemuServer.pm | 3 ---
1 file changed, 3 deletions(-)
diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm
index 8b8e8338..b9067120 100644
--- a/src/PVE/QemuServer.pm
+++ b/src/PVE/QemuServer.pm
@@ -2549,9 +2549,6 @@ sub vmstatus {
$d->{netout} = 0;
$d->{netin} = 0;
- $d->{diskread} = undef;
- $d->{diskwrite} = undef;
-
$d->{template} = 1 if PVE::QemuConfig->is_template($conf);
$d->{serial} = 1 if conf_has_serial($conf);
--
2.47.3
_______________________________________________
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] applied: [PATCH qemu-server] vm status: make sure disk{read, write} adhere to return schema to fix regression for PDM
2025-10-22 10:41 [pve-devel] [PATCH qemu-server] vm status: make sure disk{read, write} adhere to return schema to fix regression for PDM Fiona Ebner
@ 2025-10-22 11:50 ` Fabian Grünbichler
0 siblings, 0 replies; 2+ messages in thread
From: Fabian Grünbichler @ 2025-10-22 11:50 UTC (permalink / raw)
To: pve-devel, Fiona Ebner
On Wed, 22 Oct 2025 12:41:15 +0200, Fiona Ebner wrote:
> As reported in the community forum [0], Proxmox Datacenter Manager
> will fail to handle the result of the status API call for a shut down
> VM. The reason is that the return schema requires having an integer
> return value for disk{read,write}, so an explicit undef is not
> allowed. However, the properties are optional and are not relevant for
> a shut down guest, so just don't set them at all if no value was
> queried. This also makes sure that bug #6207 does not reappear. Note
> that pvestatd would already not consider the value for shut down VMs
> and treats the value not being present and the value being an explicit
> undef the same, see update_qemu_status() in pvestatd.pm.
>
> [...]
Applied, thanks!
[1/1] vm status: make sure disk{read, write} adhere to return schema to fix regression for PDM
commit: 069d8a6e14d9524ae3f2c57ba7af3668721ddbc5
Best regards,
--
Fabian Grünbichler <f.gruenbichler@proxmox.com>
_______________________________________________
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:[~2025-10-22 11:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-22 10:41 [pve-devel] [PATCH qemu-server] vm status: make sure disk{read, write} adhere to return schema to fix regression for PDM Fiona Ebner
2025-10-22 11:50 ` [pve-devel] applied: " Fabian Grünbichler
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox