Skip to content

remove shadowPodgroup in scheduler#406

Merged
volcano-sh-bot merged 1 commit intovolcano-sh:masterfrom
wangyuqing4:scheduler
Aug 5, 2019
Merged

remove shadowPodgroup in scheduler#406
volcano-sh-bot merged 1 commit intovolcano-sh:masterfrom
wangyuqing4:scheduler

Conversation

@wangyuqing4
Copy link
Copy Markdown
Contributor

@wangyuqing4 wangyuqing4 commented Aug 3, 2019

in pr #401, podgroup controller can create pg for normal pod, so remove shadowPodgroup part code in scheduler.

@volcano-sh-bot volcano-sh-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Aug 3, 2019
Comment thread pkg/scheduler/cache/cache.go Outdated
sc.Recorder.Eventf(pg, v1.EventTypeNormal, "Evict", reason)
} else {
return fmt.Errorf("Invalid PodGroup Version: %s", job.PodGroup.Version)
if job.PodGroup.Version == api.PodGroupVersionV1Alpha1 {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

let's move this into a helper function.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

new a func convertPodGroupInfo() :)

Comment thread pkg/scheduler/cache/util.go Outdated
if len(jobID) == 0 {
jobID = api.JobID(pod.UID)
}
pgName := helpers.GeneratePodgroupName(pod)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why do we still need this function?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

just want to keep the same to get pi.Job, like vk job NewJobInfo here.

image

Copy link
Copy Markdown
Member

@k82cn k82cn Aug 3, 2019

Choose a reason for hiding this comment

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

we should also update pod's podgroup-name in podgroup controller for that.

Copy link
Copy Markdown
Contributor Author

@wangyuqing4 wangyuqing4 Aug 3, 2019

Choose a reason for hiding this comment

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

? ? in podgroup controller pg name is the same as here, don't need update pg-name.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

At lease we should rename this function, since the ShadowPodGroup concept has been deprecated.

@TravisBuddy
Copy link
Copy Markdown

Hey @wangyuqing4,
Something went wrong with the build.

TravisCI finished with status errored, which means the build failed because of something unrelated to the tests, such as a problem with a dependency or the build process itself.

View build log

TravisBuddy Request Identifier: fbfdde80-b5ce-11e9-a786-5b97e93928e7

@TravisBuddy
Copy link
Copy Markdown

Travis tests have failed

Hey @wangyuqing4,
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: 148af2b0-b5d6-11e9-a786-5b97e93928e7

Comment thread pkg/scheduler/cache/cache.go Outdated
glog.Errorf("Error While converting api.PodGroup to v1alpha.PodGroup with error: %v", err)
return err
}
sc.Recorder.Eventf(pg, eventtype, reason, message)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why do we record this event?

Comment thread pkg/scheduler/cache/cache.go Outdated
} else {
return fmt.Errorf("Invalid PodGroup Version: %s", job.PodGroup.Version)
}
if err := sc.convertPodGroupInfo(job, v1.EventTypeNormal, "Evict", reason); err != nil {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Move the record event code outside of the convertPodGroupInfo.

// If pending or unschedulable, record unschedulable event.
if pgUnschedulable || pdbUnschedulabe {
if err := sc.convertPodGroupInfo(job); err != nil {
glog.Errorf("Error While converting api.PodGroup %v", err)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We should record event here :)

@k82cn
Copy link
Copy Markdown
Member

k82cn commented Aug 5, 2019

/approve
/lgtm

@volcano-sh-bot volcano-sh-bot added the lgtm Indicates that a PR is ready to be merged. label Aug 5, 2019
@volcano-sh-bot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: k82cn, wangyuqing4

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

The pull request process is described here

Details 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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 5, 2019
@volcano-sh-bot volcano-sh-bot merged commit 41fad21 into volcano-sh:master Aug 5, 2019
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.

5 participants