Skip to content

[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

Open
wants to merge 8 commits into
base: john/sled-agent-config-reconciler-datasets-refactor
Choose a base branch
from

Conversation

jgallagher
Copy link
Contributor

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 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.

Copy link
Contributor

@andrewjstone andrewjstone left a 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!

)
.await?;

// TODO-john fixme
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Copy link
Contributor Author

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.

@@ -1194,4 +1632,161 @@ mod tests {

logctx.cleanup_successful();
}

#[tokio::test]
async fn start_zone_fails_if_missing_root_dataset() {
Copy link
Contributor

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).
//
Copy link
Contributor

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?

Copy link
Contributor Author

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).

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