Restart network container when container's configure is changed.

Fix #2099
This commit is contained in:
Dawn Chen
2014-11-04 14:26:21 -08:00
parent 652a0ce4db
commit 03958f5049
2 changed files with 18 additions and 6 deletions

View File

@@ -588,6 +588,14 @@ func (kl *Kubelet) syncPod(pod *api.BoundPod, dockerContainers dockertools.Docke
continue
}
killedContainers[containerID] = empty{}
// Also kill associated network container
if netContainer, found, _ := dockerContainers.FindPodContainer(podFullName, uuid, networkContainerName); found {
if err := kl.killContainer(netContainer); err != nil {
glog.V(1).Infof("Failed to kill network container %s: %v", netContainer.ID, err)
continue
}
}
}
// Check RestartPolicy for container