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

Revert "add a 10s timeout to the client object." #1893

Merged
merged 1 commit into from
May 17, 2019

Conversation

ijc
Copy link
Contributor

@ijc ijc commented May 17, 2019

This reverts commit 59defcb (#1872) which caused #1892
since the timeout applied not only to the dial phase but to everything, so it
would kill docker logs -f ... if the container was not chatty enough.

Signed-off-by: Ian Campbell ijc@docker.com

fixes #1892
fixes docker/for-linux#669.

This reverts commit 59defcb which caused docker#1892
since the timeout applied not only to the dial phase but to everything, so it
would kill `docker logs -f ...` if the container was not chatty enough.

Signed-off-by: Ian Campbell <ijc@docker.com>
@ijc
Copy link
Contributor Author

ijc commented May 17, 2019

I'll try and find another way to add a shorter timeout at Dial time without affecting subsequent operations after the connection is up.

@codecov-io
Copy link

Codecov Report

Merging #1893 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1893   +/-   ##
=======================================
  Coverage   56.75%   56.75%           
=======================================
  Files         309      309           
  Lines       21680    21680           
=======================================
  Hits        12305    12305           
  Misses       8476     8476           
  Partials      899      899

@tao12345666333
Copy link
Contributor

Thanks.

ijc pushed a commit to ijc/go-connections that referenced this pull request May 17, 2019
This helps to address docker/cli#1739, where an
invalid `DOCKER_HOST` setting could result in a 64s delay (that's twice the
delay here because the client was trying to hit the `/_ping` endpoint twice,
which was addressed in moby/moby#39206)

I made a previous attempt to fix this purely on the Docker cli side
(docker/cli#1872) however that had the side effect of
adding the timeout across the board and not just for the dial phase, which
caused a regression for `docker logs -f` (docker/cli#1892)
and so was reverted (docker/cli#1893).

The new value of 10s is just based on a gut feeling, no initial connection
should be taking that long in the real world unless something about the network
link is pretty broken (e.g. bad dns perhaps), in which case affected users are
surely pretty used to retrying things, better to fail faster in the normal case.

Also drop the comment since the linked issue just shows that the original
number, just like the new number, was arrived at fairly arbitrarily based on
gut feelings (rather than anything empirical) so the reference is not really
terribly useful.

Signed-off-by: Ian Campbell <ijc@docker.com>
Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thaJeztah
Copy link
Member

ping @silvin-lubecki

Copy link
Contributor

@silvin-lubecki silvin-lubecki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@silvin-lubecki
Copy link
Contributor

Dumb question but, can't we override the timeout just for the logs command?

@silvin-lubecki silvin-lubecki merged commit 031d2f8 into docker:master May 17, 2019
@GordonTheTurtle GordonTheTurtle added this to the 19.09.0 milestone May 17, 2019
@ijc ijc deleted the revert-1872 branch May 17, 2019 12:33
@ijc
Copy link
Contributor Author

ijc commented May 17, 2019

The way the docker/docker/client structures it's not easily possible (at least as far as I could tell).

I raised docker/go-connections#63 to fix the dial timeout at the source without affecting the post-connection operation. I think that's the way to go -- LGTMs over there appreciated ;-)

@thaJeztah
Copy link
Member

(Removed the "cherry-pick" label, because this was not in the 19.03 branch)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Client.Timeout exceeded while reading body docker logs follow error.
6 participants