From 5a4621f45188c2756d6845626448b242871fbbc3 Mon Sep 17 00:00:00 2001 From: Brendan Burns Date: Thu, 10 Jul 2014 10:26:40 -0700 Subject: [PATCH] Try to grab live data if the cache has errors. --- pkg/registry/pod_registry.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkg/registry/pod_registry.go b/pkg/registry/pod_registry.go index bc6415bc294..cb4feb067c0 100644 --- a/pkg/registry/pod_registry.go +++ b/pkg/registry/pod_registry.go @@ -85,8 +85,14 @@ func (storage *PodRegistryStorage) fillPodInfo(pod *api.Pod) { if storage.podCache != nil { info, err := storage.podCache.GetPodInfo(pod.CurrentState.Host, pod.ID) if err != nil { - glog.Errorf("Error getting container info: %#v", err) - return + 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 + } } pod.CurrentState.Info = info }