diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2019-03-28 13:20:58 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2019-03-28 13:22:37 +0100 |
| commit | 742f448304a916ae83bcdadf7e3be76c5464b37b (patch) | |
| tree | 7f6e741df6470ae90f8d04c55a0e4e9afe6eb814 /vm/gce | |
| parent | f94f56fe6b1c892eb8cddc28e24e0290c68de003 (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 'vm/gce')
| -rw-r--r-- | vm/gce/gce.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/vm/gce/gce.go b/vm/gce/gce.go index a17ef8997..cad34addf 100644 --- a/vm/gce/gce.go +++ b/vm/gce/gce.go @@ -39,7 +39,8 @@ type Config struct { Count int `json:"count"` // number of VMs to use MachineType string `json:"machine_type"` // GCE machine type (e.g. "n1-highcpu-2") GCSPath string `json:"gcs_path"` // GCS path to upload image - GCEImage string `json:"gce_image"` // Pre-created GCE image to use + GCEImage string `json:"gce_image"` // pre-created GCE image to use + Preemptible bool `json:"preemptible"` // use preemptible VMs if available (defaults to true) } type Pool struct { @@ -67,7 +68,8 @@ func ctor(env *vmimpl.Env) (vmimpl.Pool, error) { return nil, fmt.Errorf("config param name is empty (required for GCE)") } cfg := &Config{ - Count: 1, + Count: 1, + Preemptible: true, } if err := config.LoadData(env.Config, cfg); err != nil { return nil, fmt.Errorf("failed to parse gce vm config: %v", err) @@ -144,7 +146,8 @@ func (pool *Pool) Create(workdir string, index int) (vmimpl.Instance, error) { return nil, err } log.Logf(0, "creating instance: %v", name) - ip, err := pool.GCE.CreateInstance(name, pool.cfg.MachineType, pool.cfg.GCEImage, string(gceKeyPub)) + ip, err := pool.GCE.CreateInstance(name, pool.cfg.MachineType, pool.cfg.GCEImage, + string(gceKeyPub), pool.cfg.Preemptible) if err != nil { return nil, err } |
