pkg/kubelet: return error when there is no cadvisor connection

This commit is contained in:
Xiang Li 2015-02-19 21:35:57 -08:00
parent ce1ced4322
commit c6d8bd8f5e

View File

@ -69,7 +69,7 @@ func (kl *Kubelet) statsFromDockerContainer(cc cadvisorInterface, containerId st
func (kl *Kubelet) GetContainerInfo(podFullName string, uid types.UID, containerName string, req *cadvisor.ContainerInfoRequest) (*cadvisor.ContainerInfo, error) {
cc := kl.GetCadvisorClient()
if cc == nil {
return nil, nil
return nil, fmt.Errorf("no cadvisor connection")
}
dockerContainers, err := dockertools.GetKubeletDockerContainers(kl.dockerClient, false)
if err != nil {