Skip to content

Commit

Permalink
[sled-storage] Use test-configured mountpoint root for datasets (#7110)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
smklein authored Nov 20, 2024
1 parent ce69e14 commit ee22c0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sled-storage/src/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -955,8 +955,8 @@ impl StorageManager {
err: None,
};

let mountpoint_path =
config.name.mountpoint(ZPOOL_MOUNTPOINT_ROOT.into());
let mountpoint_root = &self.resources.disks().mount_config().root;
let mountpoint_path = config.name.mountpoint(mountpoint_root);
let details = DatasetCreationDetails {
zoned: config.name.dataset().zoned(),
mountpoint: Mountpoint::Path(mountpoint_path),
Expand Down

0 comments on commit ee22c0e

Please sign in to comment.