Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"cannot enable tty mode on non tty input" when stopping che from non-tty process #4005

Closed
merlijn-sebrechts opened this issue Feb 2, 2017 · 1 comment
Assignees
Labels
kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system.

Comments

@merlijn-sebrechts
Copy link

merlijn-sebrechts commented Feb 2, 2017

To reproduce, run eclipse Che and stop it using the following command. By capturing the output and piping it, the process doesn't get a tty/pty.

(docker run -i --rm -v /var/run/docker.sock:/var/run/docker.sock -v /home/ubuntu/:/data eclipse/che stop) | cat

You get the following output.

WARN: Bound 'eclipse/che' to 'eclipse/che:5.2.0'
WARNING: No swap limit support
WARN: Did not detect TTY - interactive mode disabled
INFO: (che cli): 5.2.0 - using docker 1.12.3 / native
INFO: Waiting for graceful stop of services...
cannot enable tty mode on non tty input

After this, the command exits (code 1), and che keeps on running.

Looking at the trace output; the following line gets executed:

++ docker run --rm --env-file /tmp/docker_run_vars -v /var/run/docker.sock:/var/run/docker.sock -v /root:/root -w / -it eclipse/che-action:5.2.0 graceful-stop

As you can see, the -t flag is wrongfully added. This is because it is hardcoded in cmd_action.sh

Full trace: http://pastebin.ubuntu.com/23911164/

OS and version:

Ubuntu 16.04

Diagnostics:

WARN: Bound 'eclipse/che' to 'eclipse/che:5.2.0'
WARNING: No swap limit support
WARN: Did not detect TTY - interactive mode disabled
INFO: (che cli): 5.2.0 - using docker 1.12.3 / native
WARN: CHE_HOST (xxxxxxxxxxxxxxx) overridden by che.env (xxxxxxxxxxxxxxx)

CLI:
 TTY:            false
 Daemon:         /var/run/docker.sock
 Image:          eclipse/che
 Version:        5.2.0
 Command:        info
 Parameters:     info
Mounts:
 /data:          /home/ubuntu/
 /data/instance: not set
 /data/backup:   not set
 /repo:          not set
 /assembly:      not set
 /sync:          not set
 /unison:        not set
 /chedir:        not set
System:
 Docker:         native
 Proxy:          not set
Internal:
 CHE_VERSION:    5.2.0
 CHE_HOST:       xxxxxxxxxxxxxxx
 CHE_INSTANCE:   /home/ubuntu//instance
 CHE_CONFIG:     /home/ubuntu/
 CHE_BACKUP:     /home/ubuntu//backup
 CHE_REGISTRY:   /version
 CHE_DEBUG:      false
 IP Detection:   xxxxxxxxxxxxxxx
 Initialized:    true
Image Registry:
 IMAGE_INIT=eclipse/che-init:5.2.0
 IMAGE_CHE=eclipse/che-server:5.2.0
 BOOTSTRAP_IMAGE_ALPINE=alpine:3.4
 BOOTSTRAP_IMAGE_CHEIP=eclipse/che-ip:5.2.0
 UTILITY_IMAGE_CHEACTION=eclipse/che-action:5.2.0
 UTILITY_IMAGE_CHEDIR=eclipse/che-dir:5.2.0
 UTILITY_IMAGE_CHETEST=eclipse/che-test:5.2.0
 UTILITY_IMAGE_CHEMOUNT=eclipse/che-mount:5.2.0
che.env:
 CHE_HOST=xxxxxxxxxxxxxxx
@TylerJewell TylerJewell added severity/P1 Has a major impact to usage or development of the system. kind/bug Outline of a bug - must adhere to the bug report template. labels Feb 2, 2017
@TylerJewell
Copy link

This is an issue introduced in 5.2.0 with the new graceful stop capability.

benoitf added a commit that referenced this issue Feb 7, 2017
…ommand line

It avoids to give the option when it was not added on the original command line and that the sub action is not requiring a terminal

Also now print a warning if a terminal is given without interactive mode

Change-Id: Ib76480ccf4320748a4fbc4704773b9337048ef61
Signed-off-by: Florent BENOIT <fbenoit@codenvy.com>
@benoitf benoitf added the status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. label Feb 7, 2017
@benoitf benoitf closed this as completed in ee95f2c Feb 7, 2017
@benoitf benoitf removed the status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. label Feb 7, 2017
@benoitf benoitf added this to the 5.3.0 milestone Feb 7, 2017
@JamesDrummond JamesDrummond removed this from the 5.3.0 milestone Feb 17, 2017
JPinkney pushed a commit to JPinkney/che that referenced this issue Aug 17, 2017
… from the command line (eclipse-che#4037)

It avoids to give the option when it was not added on the original command line and that the sub action is not requiring a terminal

Also now print a warning if a terminal is given without interactive mode

Change-Id: Ib76480ccf4320748a4fbc4704773b9337048ef61
Signed-off-by: Florent BENOIT <fbenoit@codenvy.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system.
Projects
None yet
Development

No branches or pull requests

4 participants