oxidecomputer / omicron

Omicron: Oxide control plane
Mozilla Public License 2.0
252 stars 40 forks source link

[sled-storage] Use test-configured mountpoint root for datasets #7110

Closed smklein closed 1 day ago

smklein commented 2 days ago

This change should only impact tests.

The "mountpoint" configuration, by default, uses the ZPOOL_MOUNTPOINT_ROOT as a root path where datasets may be located:

https://github.com/oxidecomputer/omicron/blob/48790e52a9b76ec91c315ca44f5c462d639e62f7/sled-storage/src/config.rs#L33-L35

In prod, this value is "/". Under tests, however, we may want more isolation between datasets, hence this configuration option.

This PR respects that configuration option when configuring datasets. This will be relevant for Sled Agent tests, and otherwise effectively acts as a no-op.

smklein commented 2 days ago

Discovered this while working on https://github.com/oxidecomputer/omicron/pull/6782 - after this PR, it's possible to use the "ensure dataset" calls as a part of the StorageManagerTestHarness.

andrewjstone commented 2 days ago

Nice find!