dualfroz 467e6d641e fix #6389: api: disks: zfs: parse the message of hot spares in use
Hot spares have no error counters in the output of 'zpool status', so a
spare that is in use only has a message after its state:

  nvme10n1      INUSE     currently in use

The parser took the three words of that message as READ, WRITE and
CKSUM counters, so the API returned zero for all of them and lost the
message, while logging warnings like:

  Argument "currently" isn't numeric in addition (+)

As 'zpool status' is called with '-p', the counters are always plain
numbers, so only accept digits for them. This way, the message of a
spare in use ends up in 'msg', like for any other vdev.

Signed-off-by: Michal Fox <me@dualfroz.com>
2026-10-02 16:17:54 +02:00
S
Description
My contributions to proxmox-git/pve-storage: 8 commits
101 KiB
0 Stars 1 Watchers 0 Forks
Languages
Perl 100%