-
Notifications
You must be signed in to change notification settings - Fork 38
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
Add pool spread topology key feature #756
Conversation
Signed-off-by: sinhaashish <[email protected]>
Signed-off-by: sinhaashish <[email protected]>
Signed-off-by: sinhaashish <[email protected]>
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.
hmm I think there's another location where you need to do the spread check, when we add replicas to existing volume?
Which also kinda of reminds me that the BDD tests are not covering replica replacement nor replica count increase?
@@ -191,13 +191,6 @@ impl ResourceResize for OperationGuardArc<VolumeSpec> { | |||
let spec = self.as_ref().clone(); | |||
let state = registry.volume_state(&request.uuid).await?; | |||
|
|||
// Pre-check - Don't allow resize if the volume has snapshots. |
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.
Why did you remove the snapshot check?
let is_spread_label_same = match &context.volume.as_ref().topology { | ||
None => false, |
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.
let is_spread_label_same = match &context.volume.as_ref().topology { | |
None => false, | |
let Some(topology) = context.volume.topology.as_ref() else { | |
return Ok(false); | |
}; |
match &topology.pool { | ||
None => false, |
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.
again let Some else to reduce nesting..
.specs() | ||
.pool(&replica_candidate.pool_id)? | ||
.labels | ||
.unwrap_or_default(); |
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.
Can we not pass this information through the candidates type?
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.
Need to update the top of the file to include spread?
@sinhaashish What's the reason this PR is open? Is the change redundant or subsumed in any other merged PRs ? |
No
For pool spread topology key as zone-eu : In a 2 replica volume, if the first replica is placed on node1 or node2 on pool3 where pool label is zone-eu=eu-west-3 the second replica goes on node3 which has the label zone-eu=eu-west-X which is correct and the test case passes. There is a discrepancy . Thus closing this PR |
PoolSpreadTopologyKey: "performance" - is a exclusion
1: "performance: Gold"
2: "performance: Silver"
3: "performance: Emerald"