aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/gce
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2019-03-28 13:20:58 +0100
committerDmitry Vyukov <dvyukov@google.com>2019-03-28 13:22:37 +0100
commit742f448304a916ae83bcdadf7e3be76c5464b37b (patch)
tree7f6e741df6470ae90f8d04c55a0e4e9afe6eb814 /pkg/gce
parentf94f56fe6b1c892eb8cddc28e24e0290c68de003 (diff)
vm/gce: allow non-preemptible VMs
We are seeing some flakes during bisection and image testing. Hard to tell what's the root cause because they are episodic. But using non-preemptible VMs for bisection and image testing looks good on all fronts. Update #501
Diffstat (limited to 'pkg/gce')
-rw-r--r--pkg/gce/gce.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/gce/gce.go b/pkg/gce/gce.go
index 2e0b397ad..e5194ae00 100644
--- a/pkg/gce/gce.go
+++ b/pkg/gce/gce.go
@@ -92,7 +92,7 @@ func NewContext() (*Context, error) {
return ctx, nil
}
-func (ctx *Context) CreateInstance(name, machineType, image, sshkey string) (string, error) {
+func (ctx *Context) CreateInstance(name, machineType, image, sshkey string, preemptible bool) (string, error) {
prefix := "https://www.googleapis.com/compute/v1/projects/" + ctx.ProjectID
sshkeyAttr := "syzkaller:" + sshkey
oneAttr := "1"
@@ -132,7 +132,7 @@ func (ctx *Context) CreateInstance(name, machineType, image, sshkey string) (str
},
Scheduling: &compute.Scheduling{
AutomaticRestart: &falseAttr,
- Preemptible: true,
+ Preemptible: preemptible,
OnHostMaintenance: "TERMINATE",
},
}