Skip to content

RSS support for deploying multiple instances of a component on a Sled #3446

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

Merged
merged 5 commits into from
Jun 30, 2023

Conversation

davepacheco
Copy link
Collaborator

@davepacheco davepacheco commented Jun 28, 2023

Based on #3390 because that changes a bunch of the same code and I expect it to land sooner than this.

This PR moves us closer to being able to provision multiple CockroachDB zones, even on the same host (e.g., in development and CI) by reworking how RSS assigns components to Sleds to be component-oriented instead of sled-oriented.

I had initially thought I'd do some more work in this PR but I think I want to separate that into follow-on PRs.

@davepacheco davepacheco requested a review from smklein June 28, 2023 23:00
@davepacheco davepacheco marked this pull request as ready for review June 28, 2023 23:01
Base automatically changed from unify to main June 29, 2023 00:36
@davepacheco
Copy link
Collaborator Author

Sorry for the force push. The change is about the same, but it was much easier to rebase this one than resolve a bunch of the merge conflicts.

Copy link
Collaborator

@smklein smklein left a comment

Choose a reason for hiding this comment

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

Looks great, thanks for improving this.

I think with your addition of SledInfo, we could make a really minor refactor to make the plan-provisioning testable!

Comment on lines +243 to +267
// Load the information we need about each Sled to be able to allocate
// components on it.
let mut sled_info = {
let result: Result<Vec<SledInfo>, PlanError> =
futures::future::try_join_all(sleds.values().map(
|sled_request| async {
let subnet = sled_request.subnet;
let sled_address = get_sled_address(subnet);
let u2_zpools =
Self::get_u2_zpools_from_sled(log, sled_address)
.await?;
let is_scrimlet =
Self::is_sled_scrimlet(log, sled_address).await?;
Ok(SledInfo::new(
sled_request.id,
subnet,
sled_address,
u2_zpools,
is_scrimlet,
))
},
))
.await;
result?
};
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we just make this Vec<SledInfo> a required input to this function?

If we do so, I don't think this function tries to contact sled agents directly, and it might be easier to write tests using a "TransientDnsServer"

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, I think that's a great idea.

@davepacheco davepacheco enabled auto-merge (squash) June 30, 2023 21:42
@davepacheco davepacheco merged commit 821fc78 into main Jun 30, 2023
@davepacheco davepacheco deleted the dap/multi-crdb branch June 30, 2023 22:31
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