Skip to content
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

RSS: Nexus handoff dataset addresses are inconsistent with the initial blueprint #7318

Open
jgallagher opened this issue Jan 7, 2025 · 0 comments

Comments

@jgallagher
Copy link
Contributor

RSS's handoff to Nexus includes both the initial blueprint:

/// Blueprint describing services initialized by RSS.
pub blueprint: Blueprint,

and a list of datasets to record:

/// Datasets on the rack which have been provisioned by RSS.
pub datasets: Vec<DatasetCreateRequest>,

The Blueprint itself also holds a list of datasets. These should be consistent, but currently aren't: the blueprint only populates address for Crucible datasets, but RSS populates the address for any durable dataset associated with a zone:

// If any datasets came from a zone, patch their addresses.
//
// It would be better if "datasets" was keyed off of a DatasetUuid,
// but the SeldConfig storing zones does not know about
// DatasetUuids.
//
// Instead, we use the (Zpool, DatasetKind) tuple as a unique
// identifier for the dataset.
for zone in &sled_config.zones {
if let Some(dataset) = zone.zone_type.durable_dataset() {
let Some(entry) = datasets.get_mut(&(
dataset.dataset.pool_name.id(),
dataset.kind.clone(),
)) else {
panic!("zone's durable dataset not found");
};
entry.request.address = Some(dataset.address.to_string());
}
}

At a minimum these should be consistent, but maybe the blueprint has grown to the point where we could remove datasets from the handoff altogether (and let Nexus do what it needs based on the contents of the blueprint)? The same might be true for RackInitializationRequest::{physical_disks,zpools}.

jgallagher added a commit that referenced this issue Jan 7, 2025
Fixes #7318 - two sets can't be out of sync if we delete one of them!
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

No branches or pull requests

1 participant