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

Add placeholder support for e2e and some reclaim cases #898

Merged
merged 6 commits into from
Jul 3, 2020

Conversation

alcorj-mizar
Copy link
Contributor

No description provided.

   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]>
@volcano-sh-bot volcano-sh-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jul 2, 2020
@TravisBuddy
Copy link

Travis tests have failed

Hey @alcorj-mizar,
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.

TravisBuddy Request Identifier: 382c4b90-bc3f-11ea-937a-75d40a178b7c

@alcorj-mizar alcorj-mizar force-pushed the master branch 2 times, most recently from d3003a9 to 9a91c8f Compare July 2, 2020 09:05
@TravisBuddy
Copy link

Travis tests have failed

Hey @alcorj-mizar,
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.

TravisBuddy Request Identifier: f4c4e3c0-bc49-11ea-937a-75d40a178b7c

@TravisBuddy
Copy link

Travis tests have failed

Hey @alcorj-mizar,
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.

TravisBuddy Request Identifier: 197416c0-bc52-11ea-937a-75d40a178b7c

@alcorj-mizar alcorj-mizar force-pushed the master branch 3 times, most recently from d03c67a to 7811052 Compare July 2, 2020 14:24
@TravisBuddy
Copy link

Travis tests have failed

Hey @alcorj-mizar,
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.

TravisBuddy Request Identifier: e66a9d80-bc6f-11ea-937a-75d40a178b7c

@TravisBuddy
Copy link

Travis tests have failed

Hey @alcorj-mizar,
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.

TravisBuddy Request Identifier: bce51000-bc77-11ea-937a-75d40a178b7c

@alcorj-mizar alcorj-mizar force-pushed the master branch 2 times, most recently from 1fbab60 to ff65797 Compare July 3, 2020 00:09
    update slot resources

Signed-off-by: alcorj.mizar <[email protected]>
@TravisBuddy
Copy link

Travis tests have failed

Hey @alcorj-mizar,
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.

TravisBuddy Request Identifier: d35486a0-bcc6-11ea-ab91-9125a069a76b

 add placeholder check to reduce execution time

Signed-off-by: alcorj.mizar <[email protected]>
@TravisBuddy
Copy link

Travis tests have failed

Hey @alcorj-mizar,
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.

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]>
ctx := initTestContext(options{
queues: []string{q2},
nodesNumLimit: 4,
nodesResourceLimit: v1.ResourceList{"cpu": resource.MustParse("1000m"), "memory": resource.MustParse("1024Mi")},
Copy link
Collaborator

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

small nits fixed

Copy link
Collaborator

@hzxuzhonghu hzxuzhonghu left a comment

Choose a reason for hiding this comment

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

/lgtm

@volcano-sh-bot volcano-sh-bot added lgtm Indicates that a PR is ready to be merged. and removed lgtm Indicates that a PR is ready to be merged. labels Jul 3, 2020
@TravisBuddy
Copy link

Travis tests have failed

Hey @alcorj-mizar,
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.

TravisBuddy Request Identifier: b34345f0-bce3-11ea-ab91-9125a069a76b

   fix nits of resource definition

Signed-off-by: alcorj.mizar <[email protected]>
@TravisBuddy
Copy link

Travis tests have failed

Hey @alcorj-mizar,
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.

TravisBuddy Request Identifier: adb92140-bcf2-11ea-ab91-9125a069a76b

Copy link
Collaborator

@hzxuzhonghu hzxuzhonghu left a 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.")
Copy link
Collaborator

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{})
Copy link
Collaborator

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" {
Copy link
Collaborator

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

Copy link
Contributor Author

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,
Copy link
Collaborator

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?

Copy link
Contributor Author

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.

@volcano-sh-bot volcano-sh-bot added the lgtm Indicates that a PR is ready to be merged. label Jul 3, 2020
@hzxuzhonghu hzxuzhonghu added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 3, 2020
@volcano-sh-bot volcano-sh-bot removed the lgtm Indicates that a PR is ready to be merged. label Jul 3, 2020
@TravisBuddy
Copy link

Travis tests have failed

Hey @alcorj-mizar,
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.

TravisBuddy Request Identifier: 70a34bd0-bcf9-11ea-ab91-9125a069a76b

   remove no passing cases

Signed-off-by: alcorj.mizar <[email protected]>
Copy link
Collaborator

@hzxuzhonghu hzxuzhonghu left a 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

@volcano-sh-bot volcano-sh-bot added the lgtm Indicates that a PR is ready to be merged. label Jul 3, 2020
@volcano-sh-bot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@volcano-sh-bot volcano-sh-bot merged commit 5071fc0 into volcano-sh:master Jul 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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. 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.

4 participants