aboutsummaryrefslogtreecommitdiffstats
path: root/vm/vmm
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2018-09-19 13:37:41 +0200
committerDmitry Vyukov <dvyukov@google.com>2018-09-20 14:53:59 +0200
commit88f20b7bcc1efa00cb8e88f426cbea7ef4c3dd6e (patch)
tree740f9783ce599411383f9ce27dac046b9e04ea9f /vm/vmm
parentd1086008f6c5c231029122ac1182b58798c75016 (diff)
vm/vmm: increase timeouts
A dozen of vmm's running on a GCE machine can be really slow to boot. Timeouts have only single goal: preventing complete system stalls when/if external commands episodically hang. There is no value in keeping them as close as possible to expected durations. This can only lead to various flakes. Increase timeouts by an order of magnitude.
Diffstat (limited to 'vm/vmm')
-rw-r--r--vm/vmm/vmm.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/vm/vmm/vmm.go b/vm/vmm/vmm.go
index 5dce85eef..93ee45583 100644
--- a/vm/vmm/vmm.go
+++ b/vm/vmm/vmm.go
@@ -183,13 +183,13 @@ func (inst *instance) Boot() error {
select {
case ip := <-ipch:
inst.sshhost = ip
- case <-time.After(1 * time.Minute):
+ case <-time.After(10 * time.Minute):
bootOutputStop <- true
<-bootOutputStop
return vmimpl.BootError{Title: "no IP found", Output: bootOutput}
}
- if err := vmimpl.WaitForSSH(inst.debug, 2*time.Minute, inst.sshhost,
+ if err := vmimpl.WaitForSSH(inst.debug, 20*time.Minute, inst.sshhost,
inst.sshkey, inst.sshuser, inst.os, inst.sshport); err != nil {
bootOutputStop <- true
<-bootOutputStop
@@ -220,7 +220,7 @@ func (inst *instance) Copy(hostSrc string) (string, error) {
if inst.debug {
log.Logf(0, "running command: scp %#v", args)
}
- _, err := osutil.RunCmd(3*time.Minute, "", "scp", args...)
+ _, err := osutil.RunCmd(10*time.Minute, "", "scp", args...)
if err != nil {
return "", err
}
@@ -288,7 +288,7 @@ func (inst *instance) Diagnose() bool {
for _, c := range commands {
select {
case inst.diagnose <- c:
- case <-time.After(2 * time.Second):
+ case <-time.After(5 * time.Second):
}
}
return true
@@ -353,7 +353,7 @@ func (inst *instance) vmctl(args ...string) (string, error) {
if inst.debug {
log.Logf(0, "running command: vmctl %#v", args)
}
- out, err := osutil.RunCmd(10*time.Second, "", "vmctl", args...)
+ out, err := osutil.RunCmd(time.Minute, "", "vmctl", args...)
if err != nil {
if inst.debug {
log.Logf(0, "vmctl failed: %v", err)