Bug 1329423

Summary: Skip /dev setup in container when it is bind mounted in
Product: Red Hat Enterprise Linux 7 Reporter: Scott Dodson <sdodson>
Component: dockerAssignee: Daniel Walsh <dwalsh>
Status: CLOSED ERRATA QA Contact: atomic-bugs <atomic-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.2CC: amurdaca, bleanhar, dgoodwin, dwalsh, lsm5, lsu, mjenner, mwysocki, sghosh
Target Milestone: rcKeywords: Extras
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: docker-1.9.1-32.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-12 15:17:53 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:

Description Scott Dodson 2016-04-21 22:21:31 UTC
Need this fix in docker-1.9.1
https://github.com/runcom/docker/commit/9a6e5e149d4acfff484ae0eb68334012370cbfca

Comment 1 Scott Dodson 2016-04-21 22:22:34 UTC
So that we can use /dev in privileged containers. See https://bugzilla.redhat.com/show_bug.cgi?id=1329326

Comment 3 Antonio Murdaca 2016-04-21 22:41:59 UTC
I had already opened a PR https://github.com/projectatomic/docker/pull/131. We'll go ahead and merge it. Thanks for testing.

Comment 4 Antonio Murdaca 2016-04-22 13:07:01 UTC
Scott does my fix breaks something? Just want to make sure the introduction of this fix does not regress on something else.

Comment 5 Scott Dodson 2016-04-22 13:13:21 UTC
We haven't had time to test it yet. I believe this is only known to have happened on atomic host which means we have to build a new os-tree to bring this in. Hopefully we can get it tested today.

Comment 6 Daniel Walsh 2016-04-22 14:10:11 UTC
Merged, lets do a build.

Comment 8 Scott Dodson 2016-04-22 18:28:28 UTC
*** Bug 1329326 has been marked as a duplicate of this bug. ***

Comment 11 Scott Dodson 2016-04-25 12:48:17 UTC
Reproducer, perform a containerized install of Origin using atomic host.

1) Provision an atomic host machine, below we assume the hostname is 'ose3-master.example.com'
2) git clone https://github.com/openshift/openshift-ansible
3) cat <<EOF> ~/bz1329424
[OSEv3:children]
masters
nodes

[OSEv3:vars]
deployment_type=openshift-enterprise
containerized=true
ansible_ssh_user=root

[masters]
ose3-master.example.com

[nodes]
ose3-master.example.com openshift_node_labels="{'region': 'infra', 'zone': 'default'}"
EOF

4) ansible-playbook -i ~/bz1329424 openshift-ansible/playbooks/byo/config.yml

SSH into atomic host as non-root user.

Comment 12 Luwen Su 2016-05-03 12:30:59 UTC
I could verified this with steps below

Assume has a host 10.66.0.137
#useradd test
#passwd test
redhat

#docker run -v /dev/:/dev/ -it rhel:latest /bin/bash

Then SSH to the host with another machine
#ssh test.0.137

In previous version, i met
$ ssh test.3.137 -X
test.3.137's password: 
X11 forwarding request failed on channel 0
PTY allocation request failed on channel 0

in docker-1.9.1-38.el7.x86_64
$ ssh test.0.137 -X
test.0.137's password: 
X11 forwarding request failed on channel 0
Last login: Tue May  3 20:19:02 2016 from 10.66.70.123
[test@dhcp-0-137 ~]$ 


Just one question here:
Once the terminal fall in "PTY error", i can't recover it , like
* Use 1.9.1-30 mount the /dev in container -> PTY error
   * update to 1.9.1-38, container can' start with -v /dev/:/dev/ and still met the PTY error with non-root user via ssh

* Use 1.9.1-38 mount the /dev in container -> everything will be okay

I'd like to know is it expected

Comment 13 Daniel Walsh 2016-05-03 12:36:39 UTC
Yes this is what is expected.

Comment 14 Luwen Su 2016-05-03 15:39:51 UTC
(In reply to Daniel Walsh from comment #13)
> Yes this is what is expected.

thanks ! move to verified

Comment 16 errata-xmlrpc 2016-05-12 15:17:53 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2016-1034.html