Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Respect minimum distance when rebalancing meta1 databases #2005

Conversation

AymericDu
Copy link
Member

SUMMARY

Respect minimum distance when rebalancing meta1 databases

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME
  • Python API
SDS VERSION
openio 4.8.3.dev5

@AymericDu AymericDu requested review from murlock and fvennetier March 20, 2020 17:23

if len(available_svcs_by_site) < self.replicas:
raise ValueError(
"Less than %s services have a positive score "
Copy link
Contributor

Choose a reason for hiding this comment

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

You should include len(available_svcs_by_site) in error message

Copy link
Contributor

Choose a reason for hiding this comment

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

Condition and message seems incoherent:
site is first tag of loc so available_svcs_by_site will contains a dict of number of service (with score) per site.

I suppose error message should be Less than %s sites have a positve score ?

for svc_addr in svc_addrs]
svcs.sort(key=(lambda svc: svc['upper_limit']
- len(self.get_managed_bases(svc))))
_decommission(svcs[0], [base])
Copy link
Contributor

Choose a reason for hiding this comment

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

How the rebalance will react if an Exception is raised ? do we have to fix the issue and rerun the rebalance ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, we need to fix the issue and rerun the rebalance.

@AymericDu AymericDu force-pushed the respect-min-dist-when-rebalancing-meta1-databases branch from b76e4af to 28ee7dd Compare March 27, 2020 14:14
@AymericDu AymericDu force-pushed the respect-min-dist-when-rebalancing-meta1-databases branch from 28ee7dd to b712cce Compare March 27, 2020 14:43
@fvennetier fvennetier merged commit a547f3a into open-io:4.x Mar 31, 2020
@AymericDu AymericDu deleted the respect-min-dist-when-rebalancing-meta1-databases branch April 2, 2020 07:52
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants