From d9c79f8842c6a8ed1e691a44c0e97f52f1bcb910 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Tue, 5 Dec 2017 13:55:23 +0100 Subject: 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. --- vm/gce/gce.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'vm/gce') 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 -- cgit mrf-deployment