-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[sled agent] API to manage datasets explicitly (#6144)
This PR exposes an API from the Sled Agent which allows Nexus to configure datasets independently from Zones. Here's an example subset of `zfs list -o name` on a deployed system, with some annotations in-line ```bash # This is the pool of an arbitrary U.2 oxp_e12f29b8-1ab8-431e-bc96-1c1298947980 # Crucible has a dataset that isn't encrypted at the ZFS layer, because it's encrypted internally... oxp_e12f29b8-1ab8-431e-bc96-1c1298947980/crucible # ... and it contains a lot of region datasets. oxp_e12f29b8-1ab8-431e-bc96-1c1298947980/crucible/regions/... # We have a dataset which uses a trust-quorum-derived encryption key. oxp_e12f29b8-1ab8-431e-bc96-1c1298947980/crypt # Durable datasets (e.g. Cockroach's) can be stored in here. oxp_e12f29b8-1ab8-431e-bc96-1c1298947980/crypt/cockroachdb # The "debug" dataset has been historically created by + managed by the Sled Agent. oxp_e12f29b8-1ab8-431e-bc96-1c1298947980/crypt/debug # Transient zone filesystems also exist here, and are encrypted. oxp_e12f29b8-1ab8-431e-bc96-1c1298947980/crypt/zone oxp_e12f29b8-1ab8-431e-bc96-1c1298947980/crypt/zone/oxz_cockroachdb_8bbea076-ff60-4330-8302-383e18140ef3 oxp_e12f29b8-1ab8-431e-bc96-1c1298947980/crypt/zone/oxz_crucible_a232eba2-e94f-4592-a5a6-ec23f9be3296 ``` ## History Prior to this PR, the sled agent exposed no interfaces to **explicitly** manage datasets on their own. Datasets could be created one of two ways: 1. Created and managed by the sled agent, without telling Nexus. See: the `debug` dataset. 2. Created in response to requests from Nexus to create zones. See: `crucible`, `cockroachdb`, and the `zone` filesystems above. These APIs did not provide a significant amount of control over dataset usage, and provided no mechanism for setting quotas and reservations. ## This PR - Expands Nexus' notion of "dataset kind" to include the following variants: - `zone_root`, for the `crypt/zone` dataset, - `zone`, for any dataset within `crypt/zone` (e.g., `crypt/zone/oxz_cockroachdb_8bbea076-ff60-4330-8302-383e18140ef3`). - `debug` for the `crypt/debug` dataset. - Adds two endpoints to Sled Agent: `datasets_put`, and `datasets_get`, for setting a configuration of expected datasets. At the moment, `datasets_put` is purely additive, and does not remove any missing datasets. - This API provides a mechanism for Nexus to manage quotas and reservations, which it will do in the future. This PR is related to #6167, which provides additional tooling through the inventory for inspecting dataset state on deployed sleds. Fixes #6042, #6107 --------- Co-authored-by: Rain <[email protected]>
- Loading branch information
1 parent
c3c5f84
commit 648507d
Showing
43 changed files
with
1,706 additions
and
300 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.