From 43368ff7b91f04642e44a5cb6731c381e920d93e Mon Sep 17 00:00:00 2001 From: Yu-Ju Hong Date: Wed, 12 Oct 2016 17:28:54 -0700 Subject: [PATCH] Allow kuberuntime to get network namespace for not ready sandboxes Kubelet calls TearDownPod to clean up the network resources for a pod sandbox. TearDownPod relies on GetNetNS to retrieve network namespace, and the current implementation makes this impossible for not-ready sandboxes. This change removes the unnecessary filter to fix this issue. --- pkg/kubelet/kuberuntime/kuberuntime_manager.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkg/kubelet/kuberuntime/kuberuntime_manager.go b/pkg/kubelet/kuberuntime/kuberuntime_manager.go index f1d9fd6e7a6..83b01522ab6 100644 --- a/pkg/kubelet/kuberuntime/kuberuntime_manager.go +++ b/pkg/kubelet/kuberuntime/kuberuntime_manager.go @@ -941,9 +941,7 @@ func (m *kubeGenericRuntimeManager) GetPodStatus(uid kubetypes.UID, name, namesp // TODO: Rename param name to sandboxID in kubecontainer.Runtime.GetNetNS(). // TODO: Remove GetNetNS after networking is delegated to the container runtime. func (m *kubeGenericRuntimeManager) GetNetNS(sandboxID kubecontainer.ContainerID) (string, error) { - readyState := runtimeApi.PodSandBoxState_READY filter := &runtimeApi.PodSandboxFilter{ - State: &readyState, Id: &sandboxID.ID, LabelSelector: map[string]string{kubernetesManagedLabel: "true"}, }