Bug 1121689 - docker in tty mode multiplexes stdout&stderr into stdout
Summary: docker in tty mode multiplexes stdout&stderr into stdout
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: docker
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Matthew Heon
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-21 15:25 UTC by Lukas Doktor
Modified: 2019-03-06 01:56 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-09-15 21:56:23 UTC


Attachments (Terms of Use)

Description Lukas 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 Lukas 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?


Note You need to log in before you can comment on or make changes to this bug.