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

Wrong condition for reclaim action #565

Closed
zionwu opened this issue Nov 27, 2019 · 3 comments
Closed

Wrong condition for reclaim action #565

zionwu opened this issue Nov 27, 2019 · 3 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.
Milestone

Comments

@zionwu
Copy link
Contributor

zionwu commented Nov 27, 2019

Is this a BUG REPORT or FEATURE REQUEST?:
/kind bug

What happened:
In reclaim action of scheduler: https://github.com/volcano-sh/volcano/blob/master/pkg/scheduler/actions/reclaim/reclaim.go#L160, the following is wrong:

	if allRes.Less(resreq) {
		glog.V(3).Infof("Not enough resource from victims on Node <%s>.", n.Name)
		continue
	}

This means if all of mem/cpu/gpu of allRes are less than resreq, then it will not process to reclaim the resources. However, the condition should be if any of mem/cpu/gpu of allRes are less than resreq.

it should be:

	if !resreq.LessEqual(allRes) {
		glog.V(3).Infof("Not enough resource from victims on Node <%s>.", n.Name)
		continue
	}
@k82cn
Copy link
Member

k82cn commented Nov 27, 2019

/cc @sivanzcw

@k82cn
Copy link
Member

k82cn commented Nov 27, 2019

/kind bug

@volcano-sh-bot volcano-sh-bot added the kind/bug Categorizes issue or PR as related to a bug. label Nov 27, 2019
@k82cn k82cn added this to the v0.3 milestone Nov 27, 2019
@k82cn
Copy link
Member

k82cn commented Dec 19, 2019

fixed by #572 & #572

@k82cn k82cn closed this as completed Dec 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

3 participants