fix #6207: vm status: return undef values when disk{read, write} cannot be queried

If disk read/write cannot be queried because of QMP timeout, they
should not be reported as 0, because a consumer of the RRD stats
cannot distinguish between 0 being an actual 0 value and 0 being an
indicator for the absence of the real value. The RRD graphs in the UI
will already show this correctly.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Link: https://lore.proxmox.com/20250925122829.70121-2-f.ebner@proxmox.com
This commit is contained in:
Fiona Ebner 2025-09-25 14:25:08 +02:00 committed by Thomas Lamprecht
parent d44663ce6d
commit 528df52316

View file

@ -2731,8 +2731,8 @@ sub vmstatus {
$d->{netout} = 0;
$d->{netin} = 0;
$d->{diskread} = 0;
$d->{diskwrite} = 0;
$d->{diskread} = undef;
$d->{diskwrite} = undef;
$d->{template} = 1 if PVE::QemuConfig->is_template($conf);