From 1140d31d9baabfc8037ad243a311fe9d6f9f23a8 Mon Sep 17 00:00:00 2001 From: Pengfei Ni Date: Tue, 6 Dec 2016 19:49:55 +0800 Subject: [PATCH] Kubelet: only check podUID when it is actually set --- pkg/kubelet/kubelet_pods.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/kubelet/kubelet_pods.go b/pkg/kubelet/kubelet_pods.go index 2aa495bed9a..32f3ca3506d 100644 --- a/pkg/kubelet/kubelet_pods.go +++ b/pkg/kubelet/kubelet_pods.go @@ -1357,7 +1357,7 @@ func (kl *Kubelet) GetAttach(podFullName string, podUID types.UID, containerName // since whether the process is running in a TTY cannot be changed after it has started. We // need the api.Pod to get the TTY status. pod, found := kl.GetPodByFullName(podFullName) - if !found || pod.UID != podUID { + if !found || (string(podUID) != "" && pod.UID != podUID) { return nil, fmt.Errorf("pod %s not found", podFullName) } containerSpec := kubecontainer.GetContainerSpec(pod, containerName)