Skip to content

Conversation

jgallagher
Copy link
Contributor

After #9224 (on which this PR is based), there were two remaining users of StorageManagerTestHarness, both of which rely on having real ZFS pools / datasets available:

  • The zone_bundle tests exercise production code that wants to interact with ZFS properties (quota in particular; maybe others)
  • The sled-diagnostics::logs tests use ZFS snapshots

However, StorageManager and the code around it is not in a great spot: it appears to be real, production code, but it's no longer actually used by sled-agent - all of its functionality has been absorbed into the config reconciler.

This PR extracts a ZfsTestHarness - this is essentially a subset of StorageManagerTestHarness, and copy/pastes its creation of vdevs for real ZFS tests, but has a much simpler API: there were several methods of StorageManagerTestHarness that had no callers, and it handles disks / datasets / zpools itself (in a very simple way) instead of handing that off to StorageManager. Both of the test modules above are updated to use ZfsTestHarness, which I think clears the way to removing StorageManager and StorageManagerTestHarness.

Base automatically changed from john/pruning-storage-manager to main October 17, 2025 14:19
@jgallagher jgallagher merged commit d17fb15 into main Oct 17, 2025
18 checks passed
@jgallagher jgallagher deleted the john/pruning-storage-manager-2 branch October 17, 2025 14:19
jgallagher added a commit that referenced this pull request Oct 17, 2025
After #9228 (on which this PR is based), there are no remaining callers
of several sled-storage types: `StorageManager`,
`StorageManagerTestHarness`, `Error`, `AllDisks`, `StorageResources`,
and various other supporting types. This PR removes all of them.

The diff looks like there's a new `nested_dataset` module, but that's
really just a rename of what was left in the `manager` module after the
above code removal. Viewing the diffs of the two commits separately
makes that more clear.
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.

2 participants