Merge pull request #26693 from AdoHe/init_containers

Automatic merge from submit-queue

exec support init containers

Partially fixes #25818 
@smarterclayton ptal.
This commit is contained in:
k8s-merge-robot
2016-06-03 10:13:49 -07:00
3 changed files with 6 additions and 5 deletions

View File

@@ -174,10 +174,6 @@ func (p *ExecOptions) Run() error {
return err
}
if pod.Status.Phase != api.PodRunning {
return fmt.Errorf("pod %s is not running and cannot execute commands; current phase is %s", p.PodName, pod.Status.Phase)
}
containerName := p.ContainerName
if len(containerName) == 0 {
glog.V(4).Infof("defaulting container name to %s", pod.Spec.Containers[0].Name)