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

Removing logs which does not belong to volcano job #316

Merged
merged 1 commit into from
Jul 10, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 0 additions & 12 deletions pkg/controllers/job/job_controller_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,11 @@ func (cc *Controller) addPod(obj interface{}) {

jobName, found := pod.Annotations[vkbatchv1.JobNameKey]
if !found {
glog.Infof("Failed to find jobName of Pod <%s/%s>, skipping",
pod.Namespace, pod.Name)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would rather leave it here, and check the ownerreference of the pod at the begining.
Because this is so silent, we can not know what happened when unexpected result occurs.

return
}

version, found := pod.Annotations[vkbatchv1.JobVersion]
if !found {
glog.Infof("Failed to find jobVersion of Pod <%s/%s>, skipping",
pod.Namespace, pod.Name)
return
}

Expand Down Expand Up @@ -188,8 +184,6 @@ func (cc *Controller) updatePod(oldObj, newObj interface{}) {

taskName, found := newPod.Annotations[vkbatchv1.TaskSpecKey]
if !found {
glog.Infof("Failed to find taskName of Pod <%s/%s>, skipping",
newPod.Namespace, newPod.Name)
return
}

Expand All @@ -202,8 +196,6 @@ func (cc *Controller) updatePod(oldObj, newObj interface{}) {

version, found := newPod.Annotations[vkbatchv1.JobVersion]
if !found {
glog.Infof("Failed to find jobVersion of Pod <%s/%s>, skipping",
newPod.Namespace, newPod.Name)
return
}

Expand Down Expand Up @@ -283,15 +275,11 @@ func (cc *Controller) deletePod(obj interface{}) {

jobName, found := pod.Annotations[vkbatchv1.JobNameKey]
if !found {
glog.Infof("Failed to find jobName of Pod <%s/%s>, skipping",
pod.Namespace, pod.Name)
return
}

version, found := pod.Annotations[vkbatchv1.JobVersion]
if !found {
glog.Infof("Failed to find jobVersion of Pod <%s/%s>, skipping",
pod.Namespace, pod.Name)
return
}

Expand Down