Skip to content
This repository was archived by the owner on Feb 8, 2021. It is now read-only.

Commit 5de0453

Browse files
committed
Merge pull request #80 from feiskyer/fix-network-plugin
Use pod.Name instead of fullname in network plugin
2 parents 7fe2182 + 045a8a3 commit 5de0453

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pkg/kubelet/hyper/hyper.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ func (r *runtime) RunPod(pod *api.Pod, restartCount int, pullSecrets []api.Secre
699699
}
700700

701701
// Setup pod's network by network plugin
702-
err = r.networkPlugin.SetUpPod(pod.Namespace, podFullName, "", "hyper")
702+
err = r.networkPlugin.SetUpPod(pod.Namespace, pod.Name, "", "hyper")
703703
if err != nil {
704704
glog.Errorf("Hyper: networkPlugin.SetUpPod %s failed, error: %v", pod.Name, err)
705705
return err
@@ -913,7 +913,6 @@ func (r *runtime) KillPod(pod *api.Pod, runningPod kubecontainer.Pod) error {
913913
}
914914

915915
var podID string
916-
namespace := runningPod.Namespace
917916
podName := kubecontainer.BuildPodFullName(runningPod.Name, runningPod.Namespace)
918917
glog.V(4).Infof("Hyper: killing pod %q.", podName)
919918

@@ -952,7 +951,7 @@ func (r *runtime) KillPod(pod *api.Pod, runningPod kubecontainer.Pod) error {
952951
}
953952

954953
// Teardown pod's network
955-
err = r.networkPlugin.TearDownPod(namespace, podName, "", "hyper")
954+
err = r.networkPlugin.TearDownPod(runningPod.Namespace, runningPod.Name, "", "hyper")
956955
if err != nil {
957956
glog.Errorf("Hyper: networkPlugin.TearDownPod failed, error: %v", err)
958957
return err

0 commit comments

Comments
 (0)