-
Notifications
You must be signed in to change notification settings - Fork 34
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
base: develop
Are you sure you want to change the base?
Conversation
Signed-off-by: sinhaashish <ashi.sinha.87@gmail.com>
Signed-off-by: sinhaashish <ashi.sinha.87@gmail.com>
Signed-off-by: sinhaashish <ashi.sinha.87@gmail.com>
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 ? |
PoolSpreadTopologyKey: "performance" - is a exclusion
1: "performance: Gold"
2: "performance: Silver"
3: "performance: Emerald"