Merge pull request #3252 from jterry75/remove_log_connect_error
Stop logging error on v2 multi shim log failure
This commit is contained in:
commit
82f2ac7ede
@ -84,8 +84,13 @@ func (b *binary) Start(ctx context.Context) (_ *shim, err error) {
|
|||||||
go func() {
|
go func() {
|
||||||
defer f.Close()
|
defer f.Close()
|
||||||
if _, err := io.Copy(os.Stderr, f); err != nil {
|
if _, err := io.Copy(os.Stderr, f); err != nil {
|
||||||
|
// When using a multi-container shim the 2nd to Nth container in the
|
||||||
|
// shim will not have a seperate log pipe. Ignore the failure log
|
||||||
|
// message here when the shim connect times out.
|
||||||
|
if !os.IsNotExist(errors.Cause(err)) {
|
||||||
log.G(ctx).WithError(err).Error("copy shim log")
|
log.G(ctx).WithError(err).Error("copy shim log")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}()
|
}()
|
||||||
out, err := cmd.CombinedOutput()
|
out, err := cmd.CombinedOutput()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -70,8 +70,13 @@ func loadShim(ctx context.Context, bundle *Bundle, events *exchange.Exchange, rt
|
|||||||
go func() {
|
go func() {
|
||||||
defer f.Close()
|
defer f.Close()
|
||||||
if _, err := io.Copy(os.Stderr, f); err != nil {
|
if _, err := io.Copy(os.Stderr, f); err != nil {
|
||||||
|
// When using a multi-container shim the 2nd to Nth container in the
|
||||||
|
// shim will not have a seperate log pipe. Ignore the failure log
|
||||||
|
// message here when the shim connect times out.
|
||||||
|
if !os.IsNotExist(errors.Cause(err)) {
|
||||||
log.G(ctx).WithError(err).Error("copy shim log")
|
log.G(ctx).WithError(err).Error("copy shim log")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
client := ttrpc.NewClient(conn, ttrpc.WithOnClose(func() { _ = conn.Close() }))
|
client := ttrpc.NewClient(conn, ttrpc.WithOnClose(func() { _ = conn.Close() }))
|
||||||
|
Loading…
Reference in New Issue
Block a user