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

remove shadowPodgroup in scheduler #406

Merged
merged 1 commit into from
Aug 5, 2019

Conversation

wangyuqing4
Copy link
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
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
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
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() :)

if len(jobID) == 0 {
jobID = api.JobID(pod.UID)
}
pgName := helpers.GeneratePodgroupName(pod)
Copy link
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
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
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
Contributor Author

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
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

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

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

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
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?

} else {
return fmt.Errorf("Invalid PodGroup Version: %s", job.PodGroup.Version)
}
if err := sc.convertPodGroupInfo(job, v1.EventTypeNormal, "Evict", reason); err != nil {
Copy link
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
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
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
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

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.

None yet

5 participants