Have you guessed it yet? Yep, the standard library's deadlineExceeded implements Timeout(), causing engine-api to report "is docker running?" when really the provided context timed out.
This should probably be fixed before the 1.7 release to save others the 3 or so hours I spent debugging this.
Well, this was surprising.
In Go 1.7, the "golang.org/x/net/context" package is implemented in terms of the standard library's "context" package.
In particular, here is the definition of
context.DeadlineExceeded
. Let's follow that thread to the standard library'scontext.DeadlineExceeded
. Note that this error is a custom type, unlikecontext.DeadlineExceeded
pre-1.7.Now, let's take a quick look at how engine-api determines when to return
ErrConnectionFailed
- it usesisTimeout
.Have you guessed it yet? Yep, the standard library's
deadlineExceeded
implementsTimeout()
, causing engine-api to report "is docker running?" when really the provided context timed out.This should probably be fixed before the 1.7 release to save others the 3 or so hours I spent debugging this.