-
Notifications
You must be signed in to change notification settings - Fork 62
[sled-agent-config-reconciler] Check zone dataset dependencies before starting zones #8219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[sled-agent-config-reconciler] Check zone dataset dependencies before starting zones #8219
Conversation
andrewjstone
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks straightforward. Thanks for the thorough fix!
sled-agent/src/services.rs
Outdated
| ) | ||
| .await?; | ||
|
|
||
| // TODO-john fixme |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a reminder to myself to do #8220 😅. It's removed there.
| } | ||
|
|
||
| #[tokio::test] | ||
| async fn start_zone_fails_if_missing_root_dataset() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love the tests here!
| // | ||
| // Skipping that for now, follow the normal zone shutdown process | ||
| // _after_ metrics (i.e., shut down and clean up the zone). | ||
| // |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to detect if this happens?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure; most of this comment was lifted verbatim from services.rs (where we similarly didn't do anything for metrics for preexisting zones).
With all the zone start and ledgering moved to `sled-agent-config-reconciler`, we can remove this type entirely from `sled-agent`. I kept the schema check but moved it to the `legacy_configs.rs` module in the config reconciler, where the same structs still exist to allow conversion of the old ledgers -> the new combined ledger. Builds on top of #8219.
6ea36d1
into
john/sled-agent-config-reconciler-datasets-refactor
… starting zones (#8219) This dramatically reduces the work that `ServiceManager::start_omicron_zone()` does by moving most of it to the config-reconciler: * Moved: shutting down existing zone of the same name * Moved: checking for time sync * Reworked: checking datasets and choosing a root zpool (now checks are performed against the most-recently-reconciled `DatasetConfig`s, and we never choose a root zpool since all zones have a property specifying which they should use) Builds on #8064 + #8218. Fixes #8173.
This dramatically reduces the work that
ServiceManager::start_omicron_zone()does by moving most of it to the config-reconciler:DatasetConfigs, and we never choose a root zpool since all zones have a property specifying which they should use)Builds on #8064 + #8218.
Fixes #8173.