mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +00:00
Merge pull request #62936 from hanxiaoshuai/bugfix0421
catch error when failed to get podList in function failureTrap
This commit is contained in:
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
Block a user