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

UPSTREAM: attach must only allow a tty when container supports it #5497

Merged
merged 1 commit into from
Nov 3, 2015

Conversation

fabianofranz
Copy link
Member

Fixes bug 1270685 https://bugzilla.redhat.com/show_bug.cgi?id=1270685

If a container does not support TTY, warn the user if -t was provided to attach.

@smarterclayton
Copy link
Contributor

We're doing what docker does. You should ask @ncdc or possibly @mrunalp

@fabianofranz
Copy link
Member Author

For the record, edit doesn't make it raw (but I guess the underlying editor, like vi, does).

@ncdc
Copy link
Contributor

ncdc commented Oct 29, 2015

@fabianofranz I don't think this is the right fix.

if the container in the pod isn't configured with TTY=true (https://github.com/kubernetes/kubernetes/blob/master/pkg/api/v1/types.go#L993), then we shouldn't allow attach -t. We can get the pod, check the container's configuration, and either reject the attach request, or log a warning that tty isn't supported in the container, and "remove" the -t flag.

@fabianofranz
Copy link
Member Author

PR refactored, @ncdc please take a look.

@ncdc
Copy link
Contributor

ncdc commented Oct 29, 2015

@fabianofranz would you mind updating the title and description of this PR?

Does attach work if container.Stdin is false? Should we check for that too?

@fabianofranz fabianofranz changed the title UPSTREAM: MakeRaw incompatible with interactive mode in attach UPSTREAM: attach must only allow a tty when container supports it Oct 29, 2015
@fabianofranz
Copy link
Member Author

@fabianofranz
Copy link
Member Author

[test]

@smarterclayton
Copy link
Contributor

Attach allows stdin=false.

On Thu, Oct 29, 2015 at 2:33 PM, Andy Goldstein [email protected]
wrote:

@fabianofranz https://github.com/fabianofranz would you mind updating
the title and description of this PR?

Does attach work if container.Stdin is false? Should we check for that too?


Reply to this email directly or view it on GitHub
#5497 (comment).

@fabianofranz
Copy link
Member Author

Upstream PR: kubernetes/kubernetes#16537
Updated this one to refer the upstream PR #.

@openshift-bot
Copy link
Contributor

Evaluated for origin test up to 398ad3a

@fabianofranz
Copy link
Member Author

@openshift/team-project-committers upstream PR is merging.

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test FAILURE (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin/6597/)

@smarterclayton smarterclayton added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 2, 2015
@smarterclayton
Copy link
Contributor

LGTM [merge]

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_requests_origin/3913/) (Image: devenv-rhel7_2632)

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to 398ad3a

openshift-bot pushed a commit that referenced this pull request Nov 3, 2015
@openshift-bot openshift-bot merged commit b7cba4d into openshift:master Nov 3, 2015
@pweil- pweil- mentioned this pull request Nov 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants