Unverified Commit 23111ad4 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #66851 from tanshanshan/nsfix

Automatic merge from submit-queue (batch tested with PRs 66877, 66066, 66851). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. add namespace info for pod in log **What this PR does / why we need it**: add namespace info for pod in log **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes # **Special notes for your reviewer**: **Release note**: ```release-note NONE ```
parents 56679f4e 623278fd
...@@ -59,7 +59,7 @@ func NewPodGC(kubeClient clientset.Interface, podInformer coreinformers.PodInfor ...@@ -59,7 +59,7 @@ func NewPodGC(kubeClient clientset.Interface, podInformer coreinformers.PodInfor
kubeClient: kubeClient, kubeClient: kubeClient,
terminatedPodThreshold: terminatedPodThreshold, terminatedPodThreshold: terminatedPodThreshold,
deletePod: func(namespace, name string) error { deletePod: func(namespace, name string) error {
glog.Infof("PodGC is force deleting Pod: %v:%v", namespace, name) glog.Infof("PodGC is force deleting Pod: %v/%v", namespace, name)
return kubeClient.CoreV1().Pods(namespace).Delete(name, metav1.NewDeleteOptions(0)) return kubeClient.CoreV1().Pods(namespace).Delete(name, metav1.NewDeleteOptions(0))
}, },
} }
...@@ -159,11 +159,11 @@ func (gcc *PodGCController) gcOrphaned(pods []*v1.Pod) { ...@@ -159,11 +159,11 @@ func (gcc *PodGCController) gcOrphaned(pods []*v1.Pod) {
if nodeNames.Has(pod.Spec.NodeName) { if nodeNames.Has(pod.Spec.NodeName) {
continue continue
} }
glog.V(2).Infof("Found orphaned Pod %v assigned to the Node %v. Deleting.", pod.Name, pod.Spec.NodeName) glog.V(2).Infof("Found orphaned Pod %v/%v assigned to the Node %v. Deleting.", pod.Namespace, pod.Name, pod.Spec.NodeName)
if err := gcc.deletePod(pod.Namespace, pod.Name); err != nil { if err := gcc.deletePod(pod.Namespace, pod.Name); err != nil {
utilruntime.HandleError(err) utilruntime.HandleError(err)
} else { } else {
glog.V(0).Infof("Forced deletion of orphaned Pod %s succeeded", pod.Name) glog.V(0).Infof("Forced deletion of orphaned Pod %v/%v succeeded", pod.Namespace, pod.Name)
} }
} }
} }
...@@ -177,11 +177,11 @@ func (gcc *PodGCController) gcUnscheduledTerminating(pods []*v1.Pod) { ...@@ -177,11 +177,11 @@ func (gcc *PodGCController) gcUnscheduledTerminating(pods []*v1.Pod) {
continue continue
} }
glog.V(2).Infof("Found unscheduled terminating Pod %v not assigned to any Node. Deleting.", pod.Name) glog.V(2).Infof("Found unscheduled terminating Pod %v/%v not assigned to any Node. Deleting.", pod.Namespace, pod.Name)
if err := gcc.deletePod(pod.Namespace, pod.Name); err != nil { if err := gcc.deletePod(pod.Namespace, pod.Name); err != nil {
utilruntime.HandleError(err) utilruntime.HandleError(err)
} else { } else {
glog.V(0).Infof("Forced deletion of unscheduled terminating Pod %s succeeded", pod.Name) glog.V(0).Infof("Forced deletion of unscheduled terminating Pod %v/%v succeeded", pod.Namespace, pod.Name)
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment