Merge pull request #62936 from hanxiaoshuai/bugfix0421

catch error when failed to get podList in function failureTrap
pull/564/head
Kubernetes Prow Robot 2019-01-16 17:15:04 -08:00 committed by GitHub
commit 79c8ab456c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -163,6 +163,10 @@ func failureTrap(c clientset.Interface, ns string) {
}
options := metav1.ListOptions{LabelSelector: selector.String()}
podList, err := c.CoreV1().Pods(rs.Namespace).List(options)
if err != nil {
framework.Logf("Failed to list Pods in namespace %s: %v", rs.Namespace, err)
continue
}
for _, pod := range podList.Items {
framework.Logf(spew.Sprintf("pod: %q:\n%+v\n", pod.Name, pod))
}