-
Notifications
You must be signed in to change notification settings - Fork 984
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
Add placeholder support for e2e and some reclaim cases #898
Conversation
1. create placeholder when e2e need different flavor of nodes 2. add reclaim cases when new job comes in Signed-off-by: alcorj.mizar <[email protected]>
Travis tests have failedHey @alcorj-mizar, TravisBuddy Request Identifier: 382c4b90-bc3f-11ea-937a-75d40a178b7c |
d3003a9
to
9a91c8f
Compare
Travis tests have failedHey @alcorj-mizar, TravisBuddy Request Identifier: f4c4e3c0-bc49-11ea-937a-75d40a178b7c |
Travis tests have failedHey @alcorj-mizar, TravisBuddy Request Identifier: 197416c0-bc52-11ea-937a-75d40a178b7c |
d03c67a
to
7811052
Compare
Travis tests have failedHey @alcorj-mizar, TravisBuddy Request Identifier: e66a9d80-bc6f-11ea-937a-75d40a178b7c |
Travis tests have failedHey @alcorj-mizar, TravisBuddy Request Identifier: bce51000-bc77-11ea-937a-75d40a178b7c |
1fbab60
to
ff65797
Compare
update slot resources Signed-off-by: alcorj.mizar <[email protected]>
Travis tests have failedHey @alcorj-mizar, TravisBuddy Request Identifier: d35486a0-bcc6-11ea-ab91-9125a069a76b |
add placeholder check to reduce execution time Signed-off-by: alcorj.mizar <[email protected]>
Travis tests have failedHey @alcorj-mizar, TravisBuddy Request Identifier: 312cc480-bcc8-11ea-ab91-9125a069a76b |
move cases to reclaim.go and add lackof resources group Signed-off-by: alcorj.mizar <[email protected]>
test/e2e/reclaim.go
Outdated
ctx := initTestContext(options{ | ||
queues: []string{q2}, | ||
nodesNumLimit: 4, | ||
nodesResourceLimit: v1.ResourceList{"cpu": resource.MustParse("1000m"), "memory": resource.MustParse("1024Mi")}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: can we use oneCPU or something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small nits fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
Travis tests have failedHey @alcorj-mizar, TravisBuddy Request Identifier: b34345f0-bce3-11ea-ab91-9125a069a76b |
fix nits of resource definition Signed-off-by: alcorj.mizar <[email protected]>
Travis tests have failedHey @alcorj-mizar, TravisBuddy Request Identifier: adb92140-bcf2-11ea-ab91-9125a069a76b |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
Some nits to be fixed, i would approve not to block other prs
func setPlaceHolderForSchedulerTesting(ctx *testContext, req v1.ResourceList, reqNum int) (bool, error) { | ||
|
||
if !satisifyMinNodesRequirements(ctx, reqNum) { | ||
return false, lagencyerror.New("Failed to setup environment, you need to have at least " + strconv.Itoa(len(req)) + " worker node.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: fmt.Errorf
} | ||
|
||
func deletePlaceHolder(ctx *testContext) { | ||
podList, err := ctx.kubeclient.CoreV1().Pods("default").List(context.TODO(), metav1.ListOptions{}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: s/"default"/ctx.Namespace/
same applies to create place holder
podList, err := ctx.kubeclient.CoreV1().Pods("default").List(context.TODO(), metav1.ListOptions{}) | ||
Expect(err).NotTo(HaveOccurred()) | ||
for _, pod := range podList.Items { | ||
if pod.Labels["role"] == "placeholder" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not efficient loop all the pods, you can use field LabelSelector instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
ctx := initTestContext(options{ | ||
queues: []string{q2}, | ||
nodesNumLimit: 4, | ||
nodesResourceLimit: CPU1Mem1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: How could you know how much resource and how many nodes to occupy?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to test cases, and there is a node num check in init processes, the check will tell user to skip some cases that they can not afford.
Travis tests have failedHey @alcorj-mizar, TravisBuddy Request Identifier: 70a34bd0-bcf9-11ea-ab91-9125a069a76b |
remove no passing cases Signed-off-by: alcorj.mizar <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
Please fix the left comments later
[APPROVALNOTIFIER] This PR is APPROVED Approval requirements bypassed by manually added approval. This pull-request has been approved by: alcorj-mizar, hzxuzhonghu 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 |
No description provided.