From bffc7a423f20730f086c30bc189d6c6ad81d16dd Mon Sep 17 00:00:00 2001 From: Darren Stahl Date: Thu, 7 Sep 2017 18:23:57 -0700 Subject: [PATCH] Update hcsshim to v0.6.5 Signed-off-by: Darren Stahl --- vendor.conf | 2 +- vendor/github.com/Microsoft/hcsshim/container.go | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/vendor.conf b/vendor.conf index 815d3ef1fc..5176b7d3d2 100644 --- a/vendor.conf +++ b/vendor.conf @@ -1,6 +1,6 @@ # the following lines are in sorted order, FYI github.com/Azure/go-ansiterm 19f72df4d05d31cbe1c56bfc8045c96babff6c7e -github.com/Microsoft/hcsshim v0.6.4 +github.com/Microsoft/hcsshim v0.6.5 github.com/Microsoft/go-winio v0.4.5 github.com/moby/buildkit da2b9dc7dab99e824b2b1067ad7d0523e32dd2d9 https://github.com/dmcgowan/buildkit.git github.com/davecgh/go-spew 346938d642f2ec3594ed81d874461961cd0faa76 diff --git a/vendor/github.com/Microsoft/hcsshim/container.go b/vendor/github.com/Microsoft/hcsshim/container.go index b924d39f46..3354f70efc 100644 --- a/vendor/github.com/Microsoft/hcsshim/container.go +++ b/vendor/github.com/Microsoft/hcsshim/container.go @@ -201,12 +201,18 @@ func createContainerWithJSON(id string, c *ContainerConfig, additionalJSON strin if createError == nil || IsPending(createError) { if err := container.registerCallback(); err != nil { + // Terminate the container if it still exists. We're okay to ignore a failure here. + container.Terminate() return nil, makeContainerError(container, operation, "", err) } } err = processAsyncHcsResult(createError, resultp, container.callbackNumber, hcsNotificationSystemCreateCompleted, &defaultTimeout) if err != nil { + if err == ErrTimeout { + // Terminate the container if it still exists. We're okay to ignore a failure here. + container.Terminate() + } return nil, makeContainerError(container, operation, configuration, err) }