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

Add pool spread topology key feature #756

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

sinhaashish
Copy link
Member

@sinhaashish sinhaashish commented Feb 21, 2024

PoolSpreadTopologyKey: "performance" - is a exclusion
1: "performance: Gold"
2: "performance: Silver"
3: "performance: Emerald"

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>
Copy link
Contributor

@tiagolobocastro tiagolobocastro left a 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.
Copy link
Contributor

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?

Comment on lines +1013 to +1014
let is_spread_label_same = match &context.volume.as_ref().topology {
None => false,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
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);
};

Comment on lines +1016 to +1017
match &topology.pool {
None => false,
Copy link
Contributor

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();
Copy link
Contributor

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?

Copy link
Contributor

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?

@dsharma-dc
Copy link
Contributor

@sinhaashish What's the reason this PR is open? Is the change redundant or subsumed in any other merged PRs ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants