mirror of https://github.com/k3s-io/k3s
Try to grab live data if the cache has errors.
parent
b0b9606aea
commit
5a4621f451
|
@ -85,9 +85,15 @@ func (storage *PodRegistryStorage) fillPodInfo(pod *api.Pod) {
|
||||||
if storage.podCache != nil {
|
if storage.podCache != nil {
|
||||||
info, err := storage.podCache.GetPodInfo(pod.CurrentState.Host, pod.ID)
|
info, err := storage.podCache.GetPodInfo(pod.CurrentState.Host, pod.ID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
glog.Errorf("Error getting container info: %#v", err)
|
glog.Errorf("Error getting container info from cache: %#v", err)
|
||||||
|
if storage.podInfoGetter != nil {
|
||||||
|
info, err = storage.podInfoGetter.GetPodInfo(pod.CurrentState.Host, pod.ID)
|
||||||
|
}
|
||||||
|
if err != nil {
|
||||||
|
glog.Errorf("Error getting fresh container info: %#v", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
}
|
||||||
pod.CurrentState.Info = info
|
pod.CurrentState.Info = info
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue