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

bugfix: make correction of total available calculation #322

Merged
merged 2 commits into from
Jan 19, 2021

Conversation

jschwinger233
Copy link
Member

No description provided.

@jschwinger233
Copy link
Member Author

bug 是这样的, 之前的 total 是每个 scheduler 轮流计算之后取最小值, 但是由于资源是正交的, 这种算法会有问题.

比如, cpu scheduler 算出来 total=1, plan={node1: 1}; volume scheduler 算出来 total=1, plan={node2: 1}, 之前的算法算下来 total=1, 然后实际的 total 应该是 0, 因为 node1 的 volume cap = 0, node2 的 cpu cap = 0.

因此也需要 Dispense 的时候做 capacity 校验, 之前由于有 total 所以认为不需要判断, 现在需要了.

@jschwinger233 jschwinger233 requested a review from CMGS January 19, 2021 08:44
@jschwinger233 jschwinger233 changed the title [WIP] bugfix: make correction of total available calculation bugfix: make correction of total available calculation Jan 19, 2021
@jschwinger233 jschwinger233 changed the title bugfix: make correction of total available calculation [WIP] bugfix: make correction of total available calculation Jan 19, 2021
@jschwinger233 jschwinger233 changed the title [WIP] bugfix: make correction of total available calculation bugfix: make correction of total available calculation Jan 19, 2021
@CMGS
Copy link
Contributor

CMGS commented Jan 19, 2021

增加一个单测覆盖这个场景吧

@jschwinger233
Copy link
Member Author

增加一个单测覆盖这个场景吧

@CMGS CMGS merged commit fa0fab2 into projecteru2:master Jan 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants