Skip to content

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

Merged
smklein merged 1 commit into
mainfrom
fix-mountpoint-for-tests
Nov 20, 2024
Merged

[sled-storage] Use test-configured mountpoint root for datasets#7110
smklein merged 1 commit into
mainfrom
fix-mountpoint-for-tests

Conversation

@smklein

@smklein smklein commented Nov 20, 2024

Copy link
Copy Markdown
Collaborator

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:

root: Utf8PathBuf::from(
illumos_utils::zpool::ZPOOL_MOUNTPOINT_ROOT,
),

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

smklein commented Nov 20, 2024

Copy link
Copy Markdown
Collaborator Author

Discovered this while working on #6782 - after this PR, it's possible to use the "ensure dataset" calls as a part of the StorageManagerTestHarness.

@andrewjstone

Copy link
Copy Markdown
Contributor

Nice find!

@smklein smklein merged commit ee22c0e into main Nov 20, 2024
@smklein smklein deleted the fix-mountpoint-for-tests branch November 20, 2024 17:52
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