From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 5130D1FF183 for ; Wed, 22 Oct 2025 12:43:12 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 9302E150A6; Wed, 22 Oct 2025 12:43:36 +0200 (CEST) From: Fiona Ebner To: pve-devel@lists.proxmox.com Date: Wed, 22 Oct 2025 12:41:15 +0200 Message-ID: <20251022104259.47945-1-f.ebner@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1761129775402 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.020 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [qemuserver.pm, proxmox.com, pvestatd.pm] Subject: [pve-devel] [PATCH qemu-server] vm status: make sure disk{read, write} adhere to return schema to fix regression for PDM X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "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 --- 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