Skip to content

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

Merged
openshift-bot merged 1 commit into
openshift:masterfrom
fabianofranz:bugs_1270685
Nov 3, 2015
Merged

openshift-bot merged 1 commit into
openshift:masterfrom
fabianofranz:bugs_1270685

Conversation

@fabianofranz

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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

@fabianofranz

Copy link
Copy Markdown
Contributor Author

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

@ncdc

ncdc commented Oct 29, 2015

Copy link
Copy Markdown
Contributor

@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
Copy Markdown
Contributor Author

PR refactored, @ncdc please take a look.

@ncdc

ncdc commented Oct 29, 2015

Copy link
Copy Markdown
Contributor

@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
Copy Markdown
Contributor Author

@fabianofranz

Copy link
Copy Markdown
Contributor Author

[test]

@smarterclayton

Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

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

@openshift-bot

Copy link
Copy Markdown
Contributor

Evaluated for origin test up to 398ad3a

@fabianofranz

Copy link
Copy Markdown
Contributor Author

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

@openshift-bot

Copy link
Copy Markdown
Contributor

@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
Copy Markdown
Contributor

LGTM [merge]

@openshift-bot

Copy link
Copy Markdown
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
Copy Markdown
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