mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-17 15:13:08 +00:00
Merge pull request #3051 from brendandburns/flake
Add a PodUnknown phase and make ListPods return even when there are errors
This commit is contained in:
@@ -171,7 +171,7 @@ func (rs *REST) List(ctx api.Context, label, field labels.Selector) (runtime.Obj
|
||||
rs.fillPodInfo(pod)
|
||||
status, err := getPodStatus(pod, rs.nodes)
|
||||
if err != nil {
|
||||
return pod, err
|
||||
status = api.PodUnknown
|
||||
}
|
||||
pod.Status.Phase = status
|
||||
if pod.Status.Host != "" {
|
||||
@@ -285,8 +285,8 @@ func getPodStatus(pod *api.Pod, nodes client.NodeInterface) (api.PodPhase, error
|
||||
if errors.IsNotFound(err) {
|
||||
return api.PodFailed, nil
|
||||
}
|
||||
glog.Errorf("Error listing minions: %v", err)
|
||||
return "", err
|
||||
glog.Errorf("Error getting pod info: %v", err)
|
||||
return api.PodUnknown, nil
|
||||
}
|
||||
} else {
|
||||
glog.Errorf("Unexpected missing minion interface, status may be in-accurate")
|
||||
|
Reference in New Issue
Block a user