mirror of https://github.com/k3s-io/k3s
Merge pull request #62936 from hanxiaoshuai/bugfix0421
catch error when failed to get podList in function failureTrappull/564/head
commit
79c8ab456c
|
@ -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))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue