Skip to content

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.

}

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

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.
@jgallagher jgallagher merged commit 6ea36d1 into john/sled-agent-config-reconciler-datasets-refactor Jun 4, 2025
9 checks passed
@jgallagher jgallagher deleted the john/sled-agent-config-reconciler-zone-deps branch June 4, 2025 19:59
jgallagher added a commit that referenced this pull request Jun 9, 2025
… 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.
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.

4 participants