-
Notifications
You must be signed in to change notification settings - Fork 43
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
Conversation
87767f2
to
52b42da
Compare
4949ec4
to
5a7ecec
Compare
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. |
02fa09e
to
ee88853
Compare
There was a problem hiding this 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!
// 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? | ||
}; |
There was a problem hiding this comment.
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"
There was a problem hiding this comment.
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.
355bcc0
to
ee88853
Compare
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.