mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 09:22:44 +00:00
Fix the build.
This commit is contained in:
parent
12b677ad56
commit
edf3eb04e2
@ -227,20 +227,24 @@ func getPodStatus(pod *api.Pod, minions client.MinionInterface) (api.PodStatus,
|
|||||||
if pod.CurrentState.Host == "" {
|
if pod.CurrentState.Host == "" {
|
||||||
return api.PodWaiting, nil
|
return api.PodWaiting, nil
|
||||||
}
|
}
|
||||||
res, err := minions.ListMinions()
|
if minions != nil {
|
||||||
if err != nil {
|
res, err := minions.ListMinions()
|
||||||
glog.Errorf("Error listing minions: %v", err)
|
if err != nil {
|
||||||
return "", err
|
glog.Errorf("Error listing minions: %v", err)
|
||||||
}
|
return "", err
|
||||||
found := false
|
|
||||||
for _, minion := range res.Items {
|
|
||||||
if minion.ID == pod.CurrentState.Host {
|
|
||||||
found = true
|
|
||||||
break
|
|
||||||
}
|
}
|
||||||
}
|
found := false
|
||||||
if !found {
|
for _, minion := range res.Items {
|
||||||
return api.PodTerminated, nil
|
if minion.ID == pod.CurrentState.Host {
|
||||||
|
found = true
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if !found {
|
||||||
|
return api.PodTerminated, nil
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
glog.Errorf("Unexpected missing minion interface, status may be in-accurate")
|
||||||
}
|
}
|
||||||
if pod.CurrentState.Info == nil {
|
if pod.CurrentState.Info == nil {
|
||||||
return api.PodWaiting, nil
|
return api.PodWaiting, nil
|
||||||
|
Loading…
Reference in New Issue
Block a user