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
"osc exec" results in a dumb terminal and no tty #2284
Comments
@ncdc, you might want to follow along here too. |
@smarterclayton, what labels/milestone should we put on this? |
P2, bug, component/kubelet ----- Original Message -----
|
We need |
@smarterclayton last I read, upstream just wanted |
Upstream needs to support arbitrary executors, and we should get our stuff as a plugin in the upstream code.
|
@smarterclayton @mrunalp FYI I tried to swap in our dockerexec late last night. 1st issue I hit was its attempt to get the |
Upstream issue: kubernetes/kubernetes#13585 |
Yes, we need to add SIGWINCH support. That is the only way to fix. There was an upstream community member who was interested in adding support, but I haven't seen any updates in a while. We'll get around to it eventually but there are higher priority items at the moment. |
It's important to the users coming from 2.x that
osc exec
be roughly the same experience as ssh in earlier versions. This issue is meant to track progress towards making this a reality for GA.Current State
Right now we're using nsenter under the covers. As best I can tell nsenter doesn't actually create a tty nor have the ability to. In addition a
dumb
terminal is set up by default. This means:Using 'less' on a file will result in the following output:
This could be addressed today by setting a reasonable value for
$TERM
here: https://github.com/openshift/origin/blob/master/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/kubelet/dockertools/manager.go#L994. I hardcodedTERM=xterm
in my environment and that mostly worked. The trick with this approach is that it would be more correct to automatically set this based on the terminal the user is actually using.It's important to add that simply connecting with
osc exec
and settingTERM=xterm
does not work correctly today in both Kubernetes and Origin. Try doing so, runningless
and then using the up and down arrows and you'll see the problem. Even ifDocker exec
doesn't set a default terminal in docker-1.6.0-6.el7.x86_64 it's doing something to make things work as expected.Without a TTY things like screen and tmux won't work. I suspect we'll get complaints about that. The workaround right now is to run
script /dev/null -c tmux
to trick the executable you want to run. That really seems like a hack.The text was updated successfully, but these errors were encountered: