Skip to content
This repository has been archived by the owner on Jul 7, 2019. It is now read-only.

Implement queue Capability #7

Merged
merged 5 commits into from
May 15, 2019

Conversation

hzxuzhonghu
Copy link

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Partially fix volcano-sh/volcano#117

Special notes for your reviewer:

Release note:

donot allow podgroup enqueue when queue capability reached


pgResource := api.NewResource(*job.PodGroup.Spec.MinResources)
// The queue resource quota limit has not reached
if pgResource.Clone().Add(ssn.Queues[queue.UID].Allocated).LessEqual(api.NewResource(queue.Queue.Spec.Capability)) {
Copy link

Choose a reason for hiding this comment

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

we should add an Enqueue callback to ask plugin whehter it's ready to enqueue, refer to JobReady callback.

Copy link
Author

Choose a reason for hiding this comment

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

Will have a look

Copy link
Author

Choose a reason for hiding this comment

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

done

queue := ssn.Queues[queueID]
pgResource := api.NewResource(*job.PodGroup.Spec.MinResources)
// The queue resource quota limit has not reached
if pgResource.Clone().Add(attr.allocated).LessEqual(api.NewResource(queue.Queue.Spec.Capability)) {
Copy link

Choose a reason for hiding this comment

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

We may also consider maxPodGroup number as one of resource, we can open another PR for it.

Copy link
Author

Choose a reason for hiding this comment

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

ok

@k82cn
Copy link

k82cn commented May 14, 2019

LGTM overall, please ping me when CI is happy with that.

penggu pushed a commit to penggu/kube-batch that referenced this pull request May 14, 2019
@k82cn
Copy link

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
@k82cn
Copy link

k82cn commented May 15, 2019

/lgtm
/approve

@k82cn
Copy link

k82cn commented May 15, 2019

/lgtm
/approve

@volcano-sh-bot volcano-sh-bot merged commit 3696b73 into volcano-retired:master May 15, 2019
kevin-wangzefeng pushed a commit to kevin-wangzefeng/scheduler that referenced this pull request Jun 28, 2019
kevin-wangzefeng pushed a commit to kevin-wangzefeng/scheduler that referenced this pull request Jun 28, 2019
kevin-wangzefeng pushed a commit to kevin-wangzefeng/scheduler that referenced this pull request Jun 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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.

MaxResource of Queue
3 participants