Bug 1174060

Summary: Can't get a shell into running container under Docker 1.4.0
Product: [Fedora] Fedora EPEL Reporter: afoxson
Component: docker-ioAssignee: Lokesh Mandvekar <lsm5>
Status: CLOSED CANTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: el6CC: adimania, admiller, golang-updates, hushan.jia, jchaloup, jperrin, lsm5, mattdm, mgoldman, miminar, s, thrcka, vbatts
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-12-20 09:01:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description afoxson 2014-12-15 02:51:12 UTC
Description of problem:

The following issue manifests under 1.4.0, yet does not manifest under 1.3.3 (nor does it manifest under 1.3.2), on CentOS 6.6. Attempting to get a shell into a running container is failing.

Version-Release number of selected component (if applicable):

docker-io-1.4.0-1.el6.x86_64.rpm

How reproducible:

The issue can be reproduced consistently.

Steps to Reproduce:
1. Execute, e.g.: sudo docker exec -it foo /bin/bash

Actual results:

"Cannot run exec command b13d5583ef1c0661e7db21bfaa164c421b50ef18248c727b99fc5426a8ccd055 in container a51df7ec54884cd5c473f1a0c4097865806abb66139fb53544ed116f4fa87264: write parent: broken pipe Error starting exec command in container b13d5583ef1c0661e7db21bfaa164c421b50ef18248c727b99fc5426a8ccd055: Cannot run exec command b13d5583ef1c066"

Expected results:

A bash shell running in container.

Additional info:

/var/log/docker contains "time="2014-12-14T16:27:58-05:00" level="error" msg="Handler for POST /exec/{name:.*}/resize returned error: bad file descriptor""

$ sudo docker version
Client version: 1.4.0
Client API version: 1.16
Go version (client): go1.3.3
Git commit (client): 4595d4f/1.4.0
OS/Arch (client): linux/amd64
Server version: 1.4.0
Server API version: 1.16
Go version (server): go1.3.3
Git commit (server): 4595d4f/1.4.0
$

Comment 1 afoxson 2014-12-20 09:01:51 UTC
"Docker exec does not work on 2.6 kernels, it needs 3.8 to support setns fully, it's a kernel requirement"

For more information, see:

https://github.com/docker/docker/issues/9680#issuecomment-67372683

The following is available as an alternative:

https://github.com/jpetazzo/nsenter