Bug 1121689

Summary: docker in tty mode multiplexes stdout&stderr into stdout
Product: Red Hat Enterprise Linux 7 Reporter: Lukáš Doktor <ldoktor>
Component: dockerAssignee: Matthew Heon <mheon>
Status: CLOSED CANTFIX QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: dwalsh, jrieden
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-09-15 21:56:23 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 Lukáš Doktor 2014-07-21 15:25:36 UTC
Description of problem:
The handling of stdout/stderr stream is not correct in tty mode (works fine in non-tty mode). You can see it on the example bellow. (`ls non_existing_file` prints into stderr stream)

Version-Release number of selected component (if applicable):
docker-1.1.1-1.el7.x86_64

How reproducible:
Always

Steps to Reproduce:
TTY:
[root@localhost ~]# docker run -t -a stderr fedora ls non_existing_file
[root@localhost ~]# docker run -t -a stdout fedora ls non_existing_file
ls: cannot access non_existing_file: No such file or directory
NON-TTY:
[root@localhost ~]# docker run -a stderr fedora ls non_existing_file
ls: cannot access non_existing_file: No such file or directory
[root@localhost ~]# docker run -a stdout fedora ls non_existing_file

Actual results:
In tty mode the output is visible only when STDOUT is attached, in non-tty mode it's visible in STDERR

Expected results:
In booth modes the output should be in STDERR stream.

Additional info:
When I use `ls /` it prints the info correctly into STDOUT in booth modes.

Comment 2 Daniel Walsh 2014-09-09 14:14:29 UTC
This looks like in -t mode it always prints stderr to stdout

Comment 3 Daniel Walsh 2014-09-15 21:56:23 UTC
Opened an issue https://github.com/docker/docker/issues/8040

Response is

"This is by-design. Seems like multiplexing can't be implemented for pty. There was some proposals about warnings when -t and -a stderr passed together."

So I guess I will close this as cantfix

Comment 4 Lukáš Doktor 2014-09-29 08:59:10 UTC
Hey I'd love to see the warning when -a stderr is used with tty. If not would it be possible to have this in man pages?