From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id BE83D1FF0A8 for ; Sat, 03 Oct 2026 14:50:09 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 2508B2177D; Sat, 03 Oct 2026 14:49:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dualfroz.com; s=dkim; t=1791031767; h=from:subject:date:message-id:to:mime-version: content-transfer-encoding; bh=NvFBAvvrhjT95pvsDFl3a+dhCKoYTv0WyGpSslUWxWA=; b=6MbreT4XxmLmHKET52nXenN5B810wb0C49prBoX/kGJWE5HlgkSuNuVI5fggPj9OTVPVXh 0OqG8Qa/Z4Yt6xBnYN0t0IC4wkA22G2FzSfeWfg1R8vubUMiaEIfSBcDIsUt1AWwDl5+4Y bgPz4OlBUMqwvydtLrtehvGPOv3+T/t1ynv2qr6rkzbcHlvw8e4oarQ12/dSx/rNs3EW9r bmnU/by/6PLjKqsm1pvA4pP77rNpbkfzKNrTGwzHopXeOJBiBCUw782Mizyo34fcAgY93+ 8kjwDFmxTbwOZ1bbHsB6p34Ju1IWU9MWxDH1WgWnJsi9DoRwISKhGcniOP+MTA== From: Michal Fox To: pve-devel@lists.proxmox.com Subject: [PATCH storage 0/3] api: disks: zfs: fix error counters and in-use spares in pool details Date: Sat, 3 Oct 2026 12:49:14 +0000 Message-ID: <20261003124917.7-1-me@dualfroz.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Last-TLS-Session-Version: TLSv1.3 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.294 Adjusted score from AWL reputation of From: address DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain DMARC_PASS -0.1 DMARC pass policy SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: JN426PQWHWHR7AQY6RKPN36UQ7OBFYLG X-Message-ID-Hash: JN426PQWHWHR7AQY6RKPN36UQ7OBFYLG X-MailFrom: me@dualfroz.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: the ZFS pool details of the disk API showed wrong error counters once they reach 1024, as 'zpool status' shortens them to a value like '1.10K' (#6640, #6938), and lost the message of a hot spare in use, whose words got parsed as counters (#6389). both also logged "isn't numeric" warnings to the journal. 1/3 adds a test for the zpool status parser, which the two fixes extend with their case. 2/3 requests exact counters with '-p', as Fabian suggested in #6938, and 3/3 builds on that by only accepting digits as counters. tested with 'make test' in src, each patch on its own, and with the zpool output from #6389. Michal Fox (3): test: add tests for zpool status parsing of the ZFS disk API fix #6640, #6938: api: disks: zfs: return exact error counters fix #6389: api: disks: zfs: parse the message of hot spares in use src/PVE/API2/Disks/ZFS.pm | 4 +- src/test/run_disk_tests.pl | 2 +- src/test/zfs_pool_detail_test.pm | 345 +++++++++++++++++++++++++++++++ 3 files changed, 348 insertions(+), 3 deletions(-) create mode 100644 src/test/zfs_pool_detail_test.pm -- 2.43.0