From 4772ea5aec43236e2bdf52ed5968093b5b97b5cf Mon Sep 17 00:00:00 2001 From: John Howard Date: Wed, 24 Jan 2018 16:08:16 -0800 Subject: [PATCH] Revendor Microsoft/opengcs @ v0.3.6 Signed-off-by: John Howard Upstream-commit: ace588284dc17fc9c92c30e1697558d0b2cc1262 Component: engine --- components/engine/vendor.conf | 2 +- .../vendor/github.com/Microsoft/opengcs/client/process.go | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/components/engine/vendor.conf b/components/engine/vendor.conf index 6be316124f..177e54b73d 100644 --- a/components/engine/vendor.conf +++ b/components/engine/vendor.conf @@ -7,7 +7,7 @@ github.com/docker/libtrust 9cbd2a1374f46905c68a4eb3694a130610adc62a github.com/go-check/check 4ed411733c5785b40214c70bce814c3a3a689609 https://github.com/cpuguy83/check.git github.com/gorilla/context v1.1 github.com/gorilla/mux v1.1 -github.com/Microsoft/opengcs v0.3.5 +github.com/Microsoft/opengcs v0.3.6 github.com/kr/pty 5cf931ef8f github.com/mattn/go-shellwords v1.0.3 github.com/sirupsen/logrus v1.0.3 diff --git a/components/engine/vendor/github.com/Microsoft/opengcs/client/process.go b/components/engine/vendor/github.com/Microsoft/opengcs/client/process.go index 2b98f5331e..822a90b18e 100644 --- a/components/engine/vendor/github.com/Microsoft/opengcs/client/process.go +++ b/components/engine/vendor/github.com/Microsoft/opengcs/client/process.go @@ -84,8 +84,11 @@ func (config *Config) RunProcess(commandLine string, stdin io.Reader, stdout io. } // Don't need stdin now we've sent everything. This signals GCS that we are finished sending data. - if err := process.Process.CloseStdin(); err != nil { - return nil, err + if err := process.Process.CloseStdin(); err != nil && !hcsshim.IsNotExist(err) && !hcsshim.IsAlreadyClosed(err) { + // This error will occur if the compute system is currently shutting down + if perr, ok := err.(*hcsshim.ProcessError); ok && perr.Err != hcsshim.ErrVmcomputeOperationInvalidState { + return nil, err + } } }