Skip to content
This repository has been archived by the owner on May 25, 2023. It is now read-only.

Added backfill action for BestEffort pods. #433

Merged
merged 1 commit into from
Oct 15, 2018
Merged

Added backfill action for BestEffort pods. #433

merged 1 commit into from
Oct 15, 2018

Conversation

k82cn
Copy link
Contributor

@k82cn k82cn commented Oct 14, 2018

Signed-off-by: Da K. Ma klaus1982.cn@gmail.com

fixes: #409

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: k82cn

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot requested a review from jinzhejz October 14, 2018 11:54
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 14, 2018
@TravisBuddy
Copy link

Travis tests have failed

Hey @k82cn,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.

1st Build

View build log

make verify
go build -o _output/bin/deepcopy-gen ./cmd/deepcopy-gen/
_output/bin/deepcopy-gen -i ./pkg/apis/scheduling/v1alpha1/ -O zz_generated.deepcopy
hack/verify-gofmt.sh
hack/verify-golint.sh
Errors from golint:
pkg/scheduler/actions/backfill/backfill.go:29:1: exported function New should have comment or be unexported
pkg/scheduler/actions/backfill/backfill.go:29:12: exported func New returns unexported type *backfill.backfillAction, which can be annoying to use

Please review the above warnings. You can test via "golint" and commit the result.
If the above warnings do not make sense, you can exempt this package from golint
checking by adding it to hack/.golint_failures (if your reviewer is okay with it).

!!! Error in hack/verify-golint.sh:108
  Error in hack/verify-golint.sh:108. 'false' exited with status 1
Call stack:
  1: hack/verify-golint.sh:108 main(...)
Exiting with status 1
make: *** [verify] Error 1
TravisBuddy Request Identifier: ea853060-cfa9-11e8-8e29-6bd38fa4cac4

@TravisBuddy
Copy link

Travis tests have failed

Hey @k82cn,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.

1st Build

View build log

make verify
go build -o _output/bin/deepcopy-gen ./cmd/deepcopy-gen/
_output/bin/deepcopy-gen -i ./pkg/apis/scheduling/v1alpha1/ -O zz_generated.deepcopy
hack/verify-gofmt.sh
hack/verify-golint.sh
Errors from golint:
pkg/scheduler/actions/backfill/backfill.go:29:1: exported function New should have comment or be unexported
pkg/scheduler/actions/backfill/backfill.go:29:12: exported func New returns unexported type *backfill.backfillAction, which can be annoying to use

Please review the above warnings. You can test via "golint" and commit the result.
If the above warnings do not make sense, you can exempt this package from golint
checking by adding it to hack/.golint_failures (if your reviewer is okay with it).

!!! Error in hack/verify-golint.sh:108
  Error in hack/verify-golint.sh:108. 'false' exited with status 1
Call stack:
  1: hack/verify-golint.sh:108 main(...)
Exiting with status 1
make: *** [verify] Error 1
TravisBuddy Request Identifier: 71e09ee0-cfb0-11e8-8e29-6bd38fa4cac4

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 14, 2018
@TravisBuddy
Copy link

Travis tests have failed

Hey @k82cn,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.

1st Build

View build log

make verify
go build -o _output/bin/deepcopy-gen ./cmd/deepcopy-gen/
_output/bin/deepcopy-gen -i ./pkg/apis/scheduling/v1alpha1/ -O zz_generated.deepcopy
hack/verify-gofmt.sh
hack/verify-golint.sh
Errors from golint:
pkg/scheduler/actions/backfill/backfill.go:29:1: exported function New should have comment or be unexported
pkg/scheduler/actions/backfill/backfill.go:29:12: exported func New returns unexported type *backfill.backfillAction, which can be annoying to use

Please review the above warnings. You can test via "golint" and commit the result.
If the above warnings do not make sense, you can exempt this package from golint
checking by adding it to hack/.golint_failures (if your reviewer is okay with it).

!!! Error in hack/verify-golint.sh:108
  Error in hack/verify-golint.sh:108. 'false' exited with status 1
Call stack:
  1: hack/verify-golint.sh:108 main(...)
Exiting with status 1
make: *** [verify] Error 1
make run-test
hack/make-rules/test.sh  
Running tests for APIVersion: v1,admissionregistration.k8s.io/v1alpha1,admission.k8s.io/v1alpha1,apps/v1beta1,apps/v1beta2,authentication.k8s.io/v1,authentication.k8s.io/v1beta1,authorization.k8s.io/v1,authorization.k8s.io/v1beta1,autoscaling/v1,autoscaling/v2beta1,batch/v1,batch/v1beta1,batch/v2alpha1,certificates.k8s.io/v1beta1,extensions/v1beta1,imagepolicy.k8s.io/v1alpha1,networking.k8s.io/v1,policy/v1beta1,rbac.authorization.k8s.io/v1,rbac.authorization.k8s.io/v1beta1,rbac.authorization.k8s.io/v1alpha1,scheduling.k8s.io/v1alpha1,settings.k8s.io/v1alpha1,storage.k8s.io/v1beta1,storage.k8s.io/v1,
+++ [1014 13:01:02] Running tests without code coverage
ok  	github.com/kubernetes-sigs/kube-batch/pkg/scheduler/actions/allocate	0.014s
ok  	github.com/kubernetes-sigs/kube-batch/pkg/scheduler/actions/preempt	0.013s
--- FAIL: TestNodeInfo_AddPod (0.00s)
	node_info_test.go:76: node info 0: 
		 expected Node (n1): idle <cpu 5000.00, memory 7000000000.00, GPU 0.00>, used <cpu 3000.00, memory 3000000000.00, GPU 0.00>, releasing <cpu 0.00, memory 0.00, GPU 0.00>
			 0: Task (c1-p1:c1/p1): job , status Running, pri 1, resreq cpu 1000.00, memory 1000000000.00, GPU 0.00
			 1: Task (c1-p2:c1/p2): job , status Running, pri 1, resreq cpu 2000.00, memory 2000000000.00, GPU 0.00, 
		 got Node (n1): idle <cpu 5000.00, memory 7000000000.00, GPU 0.00>, used <cpu 3000.00, memory 3000000000.00, GPU 0.00>, releasing <cpu 0.00, memory 0.00, GPU 0.00>
			 0: Task (c1-p1:c1/p1): job , status Running, pri 1, resreq cpu 1000.00, memory 1000000000.00, GPU 0.00
			 1: Task (c1-p2:c1/p2): job , status Running, pri 1, resreq cpu 2000.00, memory 2000000000.00, GPU 0.00 
--- FAIL: TestNodeInfo_RemovePod (0.00s)
	node_info_test.go:131: node info 0: 
		 expected Node (n1): idle <cpu 4000.00, memory 6000000000.00, GPU 0.00>, used <cpu 4000.00, memory 4000000000.00, GPU 0.00>, releasing <cpu 0.00, memory 0.00, GPU 0.00>
			 0: Task (c1-p1:c1/p1): job , status Running, pri 1, resreq cpu 1000.00, memory 1000000000.00, GPU 0.00
			 1: Task (c1-p3:c1/p3): job , status Running, pri 1, resreq cpu 3000.00, memory 3000000000.00, GPU 0.00, 
		 got Node (n1): idle <cpu 4000.00, memory 6000000000.00, GPU 0.00>, used <cpu 4000.00, memory 4000000000.00, GPU 0.00>, releasing <cpu 0.00, memory 0.00, GPU 0.00>
			 0: Task (c1-p3:c1/p3): job , status Running, pri 1, resreq cpu 3000.00, memory 3000000000.00, GPU 0.00
			 1: Task (c1-p1:c1/p1): job , status Running, pri 1, resreq cpu 1000.00, memory 1000000000.00, GPU 0.00 
FAIL
FAIL	github.com/kubernetes-sigs/kube-batch/pkg/scheduler/api	0.010s
ok  	github.com/kubernetes-sigs/kube-batch/pkg/scheduler/cache	0.011s
!!! Error in hack/make-rules/test.sh:213
  Error in hack/make-rules/test.sh:213. 'return ${rc}' exited with status 1
Call stack:
  1: hack/make-rules/test.sh:213 main(...)
Exiting with status 1
make: *** [run-test] Error 1
TravisBuddy Request Identifier: 0d0de470-cfb3-11e8-8e29-6bd38fa4cac4

func getTaskQoS(pod *v1.Pod) TaskQoS {
request, limit := getResourceRequest(pod)

if request.IsEmpty() && limit.IsEmpty() {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can get QoS byPod.Status.QOSClass directly, and no need to calculate

Signed-off-by: Da K. Ma <klaus1982.cn@gmail.com>
@TravisBuddy
Copy link

Travis tests have failed

Hey @k82cn,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.

1st Build

View build log

make verify
go build -o _output/bin/deepcopy-gen ./cmd/deepcopy-gen/
_output/bin/deepcopy-gen -i ./pkg/apis/scheduling/v1alpha1/ -O zz_generated.deepcopy
hack/verify-gofmt.sh
hack/verify-golint.sh
Errors from golint:
pkg/scheduler/actions/backfill/backfill.go:30:1: exported function New should have comment or be unexported
pkg/scheduler/actions/backfill/backfill.go:30:12: exported func New returns unexported type *backfill.backfillAction, which can be annoying to use

Please review the above warnings. You can test via "golint" and commit the result.
If the above warnings do not make sense, you can exempt this package from golint
checking by adding it to hack/.golint_failures (if your reviewer is okay with it).

!!! Error in hack/verify-golint.sh:108
  Error in hack/verify-golint.sh:108. 'false' exited with status 1
Call stack:
  1: hack/verify-golint.sh:108 main(...)
Exiting with status 1
make: *** [verify] Error 1
TravisBuddy Request Identifier: 31bcb0c0-d054-11e8-84c3-e12343383572

@k82cn k82cn added the lgtm Indicates that a PR is ready to be merged. label Oct 15, 2018
@k8s-ci-robot k8s-ci-robot merged commit e91b631 into kubernetes-retired:master Oct 15, 2018
@k82cn k82cn deleted the kb_409 branch October 15, 2018 10:24
kevin-wangzefeng pushed a commit to kevin-wangzefeng/scheduler that referenced this pull request Jun 28, 2019
Added backfill action for BestEffort pods.
kevin-wangzefeng pushed a commit to kevin-wangzefeng/scheduler that referenced this pull request Jun 28, 2019
Added backfill action for BestEffort pods.
kevin-wangzefeng pushed a commit to kevin-wangzefeng/scheduler that referenced this pull request Jun 28, 2019
Added backfill action for BestEffort pods.
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

All jobs are pending, when some jobs set resources,others not set resources.
4 participants