@@ -109,7 +109,7 @@ var _ = SIGDescribe("SchedulerPredicates [Serial]", func() {
109
109
110
110
for _ , node := range nodeList .Items {
111
111
framework .Logf ("\n Logging pods the kubelet thinks is on node %v before test" , node .Name )
112
- e2ekubelet . PrintAllKubeletPods (cs , node .Name )
112
+ printAllKubeletPods (cs , node .Name )
113
113
}
114
114
115
115
})
@@ -598,6 +598,22 @@ var _ = SIGDescribe("SchedulerPredicates [Serial]", func() {
598
598
})
599
599
})
600
600
601
+ // printAllKubeletPods outputs status of all kubelet pods into log.
602
+ func printAllKubeletPods (c clientset.Interface , nodeName string ) {
603
+ podList , err := e2ekubelet .GetKubeletPods (c , nodeName )
604
+ if err != nil {
605
+ framework .Logf ("Unable to retrieve kubelet pods for node %v: %v" , nodeName , err )
606
+ return
607
+ }
608
+ for _ , p := range podList .Items {
609
+ framework .Logf ("%v from %v started at %v (%d container statuses recorded)" , p .Name , p .Namespace , p .Status .StartTime , len (p .Status .ContainerStatuses ))
610
+ for _ , c := range p .Status .ContainerStatuses {
611
+ framework .Logf ("\t Container %v ready: %v, restart count %v" ,
612
+ c .Name , c .Ready , c .RestartCount )
613
+ }
614
+ }
615
+ }
616
+
601
617
func initPausePod (f * framework.Framework , conf pausePodConfig ) * v1.Pod {
602
618
var gracePeriod = int64 (1 )
603
619
pod := & v1.Pod {
0 commit comments