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

Fix calculation issue for extension resource in volcano. #162

Merged

Conversation

TommyLike
Copy link
Contributor

Use original ResourceList sum up logic to avoid resource amplify issue.

minAvailableTasksRes.Add(kbapi.NewResource(c.Resources.Requests))

The code above should not be used outside of kube-batch, since when converting back, the resource would be amplified with 1000 times. see here

@k82cn
Copy link
Member

k82cn commented May 14, 2019

/hold

It's better to make Convert2K8sResource and NewResource align with each other. BTW, please rename Convert2K8sResource to ToResourceList.

@TommyLike
Copy link
Contributor Author

TommyLike commented May 14, 2019

@k82cn I agree, but for your suggestion, it's the matter of kube-batch's, we don't need to convert it into kube-batch type and then convert it back here.

@k82cn
Copy link
Member

k82cn commented May 14, 2019

we should not duplicate the code; we maintain both repo.

@TommyLike
Copy link
Contributor Author

we should not duplicate the code; we maintain both repo.

Which are duplicated?

@k82cn
Copy link
Member

k82cn commented May 14, 2019

please help to rename Convert2K8sResource to ToResourceList and make sure them align.

@TommyLike
Copy link
Contributor Author

TommyLike commented May 14, 2019

please help to rename Convert2K8sResource to ToResourceList and make sure them align.

They are different logics, one for the kube batch resource and the other for kubernetes resource. And within this update method Convert2K8sResource is not being used anymore

@k82cn
Copy link
Member

k82cn commented May 15, 2019

Convert2K8sResource is also a bug to me, please update kube-batch to make them align.

@TommyLike
Copy link
Contributor Author

ha, removed unused codes in order to eliminate issue, see pr

@k82cn
Copy link
Member

k82cn commented May 15, 2019

/lgtm
/approve

@volcano-sh-bot volcano-sh-bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. labels May 15, 2019
@volcano-sh-bot volcano-sh-bot merged commit 00272c6 into volcano-sh:master May 15, 2019
kevin-wangzefeng pushed a commit to kevin-wangzefeng/volcano that referenced this pull request Jun 28, 2019
…_issue

Fix calculation issue for extension resource in volcano.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants