-
Notifications
You must be signed in to change notification settings - Fork 2k
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
docker: close response connection once stdin is exhausted #24202
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shoenig
force-pushed
the
docker-exec-close-stdin-conn
branch
from
October 17, 2024 13:40
2e8987c
to
1051a55
Compare
shoenig
force-pushed
the
docker-exec-close-stdin-conn
branch
from
October 17, 2024 14:29
1051a55
to
18a7c0c
Compare
shoenig
force-pushed
the
docker-exec-close-stdin-conn
branch
from
October 17, 2024 14:32
18a7c0c
to
6c81b73
Compare
shoenig
force-pushed
the
docker-exec-close-stdin-conn
branch
from
October 17, 2024 14:46
6c81b73
to
98d3528
Compare
Spot check e2e tests... Nomad 1.9 hangs as expected: ➜ nomad version
Nomad v1.9.0
BuildDate 2024-10-10T07:13:43Z
Revision 7ad36851ec02f875e0814775ecf1df0229f0a615
➜ go test -v
=== RUN TestDockerAllocExec
=== RUN TestDockerAllocExec/testDockerExecStdin
docker_exec_test.go:88:
docker_exec_test.go:88: expected nil error
↪ error: context deadline exceeded
--- FAIL: TestDockerAllocExec (16.06s)
--- FAIL: TestDockerAllocExec/testDockerExecStdin (16.06s)
FAIL
exit status 1
FAIL github.com/hashicorp/nomad/e2e/allocexec 16.064s With fix: ➜ nomad version
Nomad v1.9.1-dev
BuildDate 2024-10-17T14:46:04Z
Revision 98d35280d48052249f6667986d7777b682be923c
➜ go test -v
=== RUN TestDockerAllocExec
=== RUN TestDockerAllocExec/testDockerExecStdin
--- PASS: TestDockerAllocExec (6.15s)
--- PASS: TestDockerAllocExec/testDockerExecStdin (6.15s)
PASS
ok github.com/hashicorp/nomad/e2e/allocexec 6.158s |
shoenig
force-pushed
the
docker-exec-close-stdin-conn
branch
from
October 17, 2024 14:49
98d3528
to
2029dbe
Compare
shoenig
added
backport/ent/1.9.x+ent
Changes are backported to 1.9.x+ent
backport/1.9.x
backport to 1.9.x release line
labels
Oct 17, 2024
tgross
approved these changes
Oct 17, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Nice test!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backport/ent/1.9.x+ent
Changes are backported to 1.9.x+ent
backport/1.9.x
backport to 1.9.x release line
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR ensures we close the hijacked writer connection once there is no more data going into the stdin buffer of the exec'd command. Without this, the command (tar in this case) would hang forever awaiting more input.
Fixes #24171
Internal: NET-11378