Skip to content

UPSTREAM: 16590: Create all streams before copying in exec/attach - #5585

Merged
openshift-bot merged 1 commit into
openshift:masterfrom
ncdc:cherry-pick-16590
Nov 3, 2015
Merged

openshift-bot merged 1 commit into
openshift:masterfrom
ncdc:cherry-pick-16590

Conversation

@ncdc

@ncdc ncdc commented Nov 2, 2015

Copy link
Copy Markdown
Contributor

Create error, stdin, stdout, stderr streams first, and only start
copying once all the streams have been created. This fixes an issue
where the client immediately starts sending data for stdin before all
the other streams have been created. This ends up blocking the spdy
connection frame handler and causes the entire exec/attach session to
time out.

Fixes #5377

@ncdc

ncdc commented Nov 2, 2015

Copy link
Copy Markdown
Contributor Author

@ncdc

ncdc commented Nov 2, 2015

Copy link
Copy Markdown
Contributor Author

[test]

@csrwng

csrwng commented Nov 2, 2015

Copy link
Copy Markdown
Contributor

LGTM

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

csrwng commented Nov 2, 2015

Copy link
Copy Markdown
Contributor

sorry... I'm taking back my LGTM... seeing a timeout in at least one windows box

@csrwng

csrwng commented Nov 2, 2015

Copy link
Copy Markdown
Contributor

@ncdc I'm seeing timeouts in windows with this code... not sure what is different since I tried your patch, seems like the same change to me. I've tried in Windows Server 2012 R2 (from AWS), and Windows 7 Pro (vagrant on virtualbox)

https://gist.github.com/csrwng/55f69dacc11f356a4c4a

@ncdc

ncdc commented Nov 2, 2015

Copy link
Copy Markdown
Contributor Author

I've identified the issue. I'm working on a fix. This may affect upstream too.

Create error, stdin, stdout, stderr streams first, and only start
copying once all the streams have been created. This fixes an issue
where the client immediately starts sending data for stdin before all
the other streams have been created. This ends up blocking the spdy
connection frame handler and causes the entire exec/attach session to
time out.
@ncdc
ncdc force-pushed the cherry-pick-16590 branch from 50f9a4f to 10a9b21 Compare November 2, 2015 19:26
@ncdc

ncdc commented Nov 2, 2015

Copy link
Copy Markdown
Contributor Author

Fix applied to upstream and here

@smarterclayton

Copy link
Copy Markdown
Contributor

What was the change?

@liggitt

liggitt commented Nov 2, 2015

Copy link
Copy Markdown
Contributor
if e.stderr != nil && !e.tty {

@ncdc

ncdc commented Nov 2, 2015

Copy link
Copy Markdown
Contributor Author

What Jordan said. I missed copying a condition from the old code to the new code correctly. I left out the tty part, so the client was always sending stderr even with tty=true.

@liggitt

liggitt commented Nov 2, 2015

Copy link
Copy Markdown
Contributor

LGTM, @csrwng can you test?

@csrwng

csrwng commented Nov 2, 2015

Copy link
Copy Markdown
Contributor

Latest test in Windows 2012R2 connecting to an Origin server with current master version is good. Ship it!

@smarterclayton

Copy link
Copy Markdown
Contributor

[test]

On Mon, Nov 2, 2015 at 3:33 PM, OpenShift Bot [email protected]
wrote:

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

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

@ncdc

ncdc commented Nov 2, 2015

Copy link
Copy Markdown
Contributor Author

job 6617 failure was the github.com connectivity issue

[test]

@smarterclayton

Copy link
Copy Markdown
Contributor

[test]

On Mon, Nov 2, 2015 at 5:57 PM, OpenShift Bot [email protected]
wrote:

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

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

@liggitt

liggitt commented Nov 3, 2015

Copy link
Copy Markdown
Contributor

rsh forbidden flake (which is fixed), re[test]

@ncdc

ncdc commented Nov 3, 2015

Copy link
Copy Markdown
Contributor Author

[test]

@ncdc

ncdc commented Nov 3, 2015

Copy link
Copy Markdown
Contributor Author

Github timeout

[test]

On Tuesday, November 3, 2015, OpenShift Bot [email protected]
wrote:

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

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

@ncdc

ncdc commented Nov 3, 2015

Copy link
Copy Markdown
Contributor Author

[test]

On Tuesday, November 3, 2015, OpenShift Bot [email protected]
wrote:

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

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

@openshift-bot

Copy link
Copy Markdown
Contributor

Evaluated for origin test up to 10a9b21

@openshift-bot

Copy link
Copy Markdown
Contributor

@ncdc

ncdc commented Nov 3, 2015

Copy link
Copy Markdown
Contributor Author

Yes, green Jenkins!!!

@ncdc

ncdc commented Nov 3, 2015

Copy link
Copy Markdown
Contributor Author

[merge]

@openshift-bot

Copy link
Copy Markdown
Contributor

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin/6711/) (Image: devenv-rhel7_2637)

@openshift-bot

Copy link
Copy Markdown
Contributor

Evaluated for origin merge up to 10a9b21

openshift-bot pushed a commit that referenced this pull request Nov 3, 2015
@openshift-bot
openshift-bot merged commit 192bef7 into openshift:master Nov 3, 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.

Exec will hang in windows when streaming in 2MB or larger files into stdin

5 participants