aboutsummaryrefslogtreecommitdiffstats
path: root/vm/gce
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2017-12-05 13:55:23 +0100
committerDmitry Vyukov <dvyukov@google.com>2017-12-05 20:08:06 +0100
commitd9c79f8842c6a8ed1e691a44c0e97f52f1bcb910 (patch)
tree16f30877fd2bea5f6948197e37e92387f48643d8 /vm/gce
parent1aecf4ed31b674cb1bdfe29a58028b855749c1c6 (diff)
vm/gce: always ignore serial relay errors
GCE serial reply seems to be buggy, we see lots of "serialport: VM disconnected" and "packet_write_wait: Connection to 1.2.3.4 port 9600: Broken pipe" errors, which do not have any explanation. Ignore all serial relay errors.
Diffstat (limited to 'vm/gce')
-rw-r--r--vm/gce/gce.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/vm/gce/gce.go b/vm/gce/gce.go
index 792982560..1ea5a2db4 100644
--- a/vm/gce/gce.go
+++ b/vm/gce/gce.go
@@ -326,6 +326,11 @@ func (inst *instance) Run(timeout time.Duration, stop <-chan bool, command strin
// If the command exited successfully, we got EOF error from merger.
// But in this case no error has happened and the EOF is expected.
err = nil
+ } else if merr, ok := err.(vmimpl.MergerError); ok && merr.R == conRpipe {
+ // Console connection must never fail. If it does, it's either
+ // instance preemption or a GCE bug. In either case, not a kernel bug.
+ Logf(1, "%v: gce console connection failed with %v", inst.name, merr.Err)
+ err = vmimpl.TimeoutErr
} else {
// Check if the instance was terminated due to preemption or host maintenance.
time.Sleep(5 * time.Second) // just to avoid any GCE races