Skip to content

Wrong condition for reclaim action #565

@zionwu

Description

@zionwu

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
	}

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions