Skip to content

Conversation

jgallagher
Copy link
Contributor

Followup to (and staged on top of) #7103, and makes similar changes for datasets as that PR did for disks.

Much more expectorate churn in this one, but it should all still be stable.

if added == 0 && updated == 0 && expunged == 0 && removed == 0 {
Ok(EnsureMultiple::NotNeeded)
} else {
Ok(EnsureMultiple::Changed { added, updated, expunged, removed: 0 })
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Ok(EnsureMultiple::Changed { added, updated, expunged, removed: 0 })
Ok(EnsureMultiple::Changed { added, updated, expunged, removed })

I do think this is functionally the same, but if we have a removed variable, we should use it

use std::net::SocketAddrV6;

#[derive(Debug, thiserror::Error)]
pub enum BlueprintDatasetsEditError {
Copy link
Contributor

Choose a reason for hiding this comment

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

👍 to the detailed error.

Base automatically changed from john/reconfigurator-storage-1 to main November 20, 2024 18:52
@jgallagher jgallagher force-pushed the john/reconfigurator-storage-2 branch from ab94020 to 552d8bc Compare November 20, 2024 18:52
@jgallagher jgallagher merged commit 0b1d42d into main Nov 20, 2024
16 checks passed
@jgallagher jgallagher deleted the john/reconfigurator-storage-2 branch November 20, 2024 21:11
jgallagher added a commit that referenced this pull request Nov 21, 2024
…tStorageEditor` (#7105)

Builds and is staged on top of #7104. This introduces a
`BlueprintStorageEditor` that handles disks and datasets together, and
attempts to address the API issues described by #7080:

* Adding a zone also adds its datasets
* Adding a disk also adds its Debug and Zone Root datasets
* Expunging a disk expunges any datasets that were on it
* Expunging a dataset expunges any zones that were on it

This should allow `BlueprintBuilder` clients who don't or can't call
`sled_ensure_{disks,datasets}` (like reconfigurator-cli and some tests)
to construct valid blueprints.
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.

3 participants