Skip to content

Conversation

@Nourdeo
Copy link

@Nourdeo Nourdeo commented Nov 21, 2025

Fixes #94

This PR updates the zpool provider’s get_pool_data method to correctly
parse zpool status output on ZFS 2.3.x (while remaining compatible with ZFS
2.2.x).

ZFS 2.3.x changed the formatting of the vdev table: it now uses a
NAME STATE READ WRITE CKSUM header and space-indented rows instead of
tab-indented lines. The previous parsing logic (line.index("\t") == 0)
no longer matches, causing the provider to return an empty device list.

This patch:

  • Finds the header line
  • Collects the indented rows only
  • Extracts the first column as the device/pool name
  • Drops the NAME header from the final array

Tested on:

  • ZFS 2.2.7-1~bpo12+1 → unaffected
  • ZFS 2.3.2-2~bpo12+2 → provider now returns correct values

Refactor zpool status parsing to handle headers and indented rows.
@Nourdeo Nourdeo requested a review from a team as a code owner November 21, 2025 07:49
@CLAassistant
Copy link

CLAassistant commented Nov 21, 2025

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

zpool provider get_pool_data fails to parse zpool status output on ZFS 2.3.x

2 participants