Skip to content

Commit 326a29d

Browse files
committed
Merge pull request kubernetes#20220 from krousey/integrationlogging
Add more logging to diagnose flake
2 parents 146a9e6 + d2f829e commit 326a29d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cmd/integration/integration.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ func podsOnNodes(c *client.Client, podNamespace string, labelSelector labels.Sel
293293
}
294294
for i := range pods.Items {
295295
pod := pods.Items[i]
296-
podString := fmt.Sprintf("%q/%q", pod.Namespace, pod.Name)
296+
podString := fmt.Sprintf("%s/%s", pod.Namespace, pod.Name)
297297
glog.Infof("Check whether pod %q exists on node %q", podString, pod.Spec.NodeName)
298298
if len(pod.Spec.NodeName) == 0 {
299299
glog.Infof("Pod %q is not bound to a host yet", podString)
@@ -354,6 +354,7 @@ func podRunning(c *client.Client, podNamespace string, podName string) wait.Cond
354354
return func() (bool, error) {
355355
pod, err := c.Pods(podNamespace).Get(podName)
356356
if apierrors.IsNotFound(err) {
357+
glog.V(2).Infof("Pod %s/%s was not found", podNamespace, podName)
357358
return false, nil
358359
}
359360
if err != nil {
@@ -362,6 +363,7 @@ func podRunning(c *client.Client, podNamespace string, podName string) wait.Cond
362363
return false, nil
363364
}
364365
if pod.Status.Phase != api.PodRunning {
366+
glog.V(2).Infof("Pod %s/%s is not running. In phase %q", podNamespace, podName, pod.Status.Phase)
365367
return false, nil
366368
}
367369
return true, nil

0 commit comments

Comments
 (0)