Граф коммитов

18 Коммитов

Автор SHA1 Сообщение Дата
Dmitri Shuralyov 1ee051bb32 all: clean up obsolete +build lines and io/ioutil uses [generated]
The module go directive is at 1.20, so modernize it a bit by
applying changes generated by the script below with go1.21.1.

[git-generate]
go fix ./...
gofmt -r 'ioutil.Discard -> io.Discard' -w .
gofmt -r 'ioutil.NopCloser -> io.NopCloser' -w .
gofmt -r 'ioutil.ReadAll -> io.ReadAll' -w .
gofmt -r '"ioutil.ReadAll: %v" -> "io.ReadAll: %v"' -w .
gofmt -r 'ioutil.ReadDir -> os.ReadDir' -w .
gofmt -r 'ioutil.ReadFile -> os.ReadFile' -w .
gofmt -r 'ioutil.TempDir -> os.MkdirTemp' -w .
gofmt -r 'ioutil.TempFile -> os.CreateTemp' -w .
gofmt -r 'ioutil.WriteFile -> os.WriteFile' -w .
goimports -w .

Change-Id: I145b27756e7c6101e992747ee822e7237df4cb91
Reviewed-on: https://go-review.googlesource.com/c/build/+/527016
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2023-09-08 21:45:36 +00:00
Carlos Amedee 28f79946a9 all: add additional storage to linux-arm64-longtest builder
This adds the ability to set the size of the root drive for a GCE
host machine. The linux-arm64-longtest boot disk has been increased
from 10GB to 20GB.

Updates golang/go#49649

Change-Id: I74ebf4bd533c91c8716b7df167afacbfdded3ed3
Reviewed-on: https://go-review.googlesource.com/c/build/+/453955
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Carlos Amedee <carlos@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-11-29 20:06:34 +00:00
Russ Cox 7032644a1b buildlet, debugnewvm: fixes for apparent GCE API changes
GCE is returning a URL like
	https://blahblah/projects/symbolic-datum-552/zones/us-central1-a
in inst.Zone, not just us-central1-a.

This is making the code that expects a zone break, but it also gives us
a way to find the project, which we need in a gcloud invocation in case
the default is not the right one. So update the code to use the new
inst.Zone to its fullest potential.

Also adjust the 'probing buildlet' loop to be just a little less aggressive.
It can take a while before it succeeds, and every failed probe prints a large
Python stack trace, making once per second a bit too much.

Change-Id: I4512aa5498cef34ca43b9c50fc47efdbeca15c60
Reviewed-on: https://go-review.googlesource.com/c/build/+/419076
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-07-26 14:59:03 +00:00
Dmitri Shuralyov 7413a137a5 cmd/coordinator: consolidate and increase global VM deletion timeout
We had a lot of flexibility over timeouts, making their maintenance
harder. Consolidate it to a single timeout in the pool package, and
modify it from 45 minutes to 2 hours.

There's room for improvement in how we maintain this timeout,
but I'm leaving that for future work (with a tracking issue).

Fixes golang/go#52591.
Updates golang/go#52929.
Updates golang/go#49666.
Updates golang/go#42699.

Change-Id: I2ad92648d89a714397bd8b0e1ec490fc9f6d6790
Reviewed-on: https://go-review.googlesource.com/c/build/+/406216
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2022-05-16 16:01:33 +00:00
Carlos Amedee f8a16ea8a8 all: use buildlet client interface to enable testing
This change introduces the use of a buildlet client interface in
existing functions. This is being introduced in order to facilitate
testing.

Change-Id: I41cd5a372fc31edbd9bcba1859cdf84308360174
Reviewed-on: https://go-review.googlesource.com/c/build/+/371818
Trust: Carlos Amedee <carlos@golang.org>
Run-TryBot: Carlos Amedee <carlos@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Alex Rakoczy <alex@golang.org>
2021-12-16 16:21:21 +00:00
Heschi Kreinick c17ef9ab22 buildlet: support IAP tunnels for connecting to GCE VMs
Now that we're not allocating external IP addresses to our VMs, you
can't get to them directly from outside our GCP project. The way to fix
that is to use an IAP tunnel. Sadly, there is no API for creating an IAP
tunnel other than gcloud; we have to shell out to it.

Change-Id: I577734aae669a952705276f88f878f040a4b3bf0
Reviewed-on: https://go-review.googlesource.com/c/build/+/364414
Trust: Heschi Kreinick <heschi@google.com>
Run-TryBot: Heschi Kreinick <heschi@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
2021-11-19 18:35:53 +00:00
Alexander Rakoczy f2096ad995 buildlet: increase timeout period for client
The a1.metal instances take about four minutes to become available
before beginning to boot the Windows ARM64 VM. This means we need
somewhere between five and ten minutes before we can first connect to
the buildlet.

It's possible that other instances are faster to boot, but this is
currently the most economical choice.

For golang/go#42604

Change-Id: Ib76944307c9ad28fd1adca0dc54f3fbeaabfffa0
Reviewed-on: https://go-review.googlesource.com/c/build/+/322654
Trust: Alexander Rakoczy <alex@golang.org>
Run-TryBot: Alexander Rakoczy <alex@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
2021-05-26 15:57:38 +00:00
Carlos Amedee 87d102082c buildlet: use cloud client with AWS buildlet
Use the cloud package for AWS functions. Remove the unused
destroyVM function.

Updates golang/go#36841

Change-Id: I00e1a20c904f7c4be6460ac302085b28f518d161
Reviewed-on: https://go-review.googlesource.com/c/build/+/236300
Run-TryBot: Carlos Amedee <carlos@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Alexander Rakoczy <alex@golang.org>
2020-06-16 13:47:54 +00:00
Carlos Amedee bf27e27323 buildlet: ensure buildlet client creation timeout is correct
The buildlet client creation will either timeout at the current
default timeout period or the timeout set in the context. The
existing effective timeout is the five seconds set in the
probeBuildlet function.

Fixes golang/go#38956
Updates golang/go#36841

Change-Id: I09e96e2c5abcc45ccd535596104c52998ddb0d7a
Reviewed-on: https://go-review.googlesource.com/c/build/+/232997
Run-TryBot: Carlos Amedee <carlos@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Alexander Rakoczy <alex@golang.org>
2020-05-08 19:34:32 +00:00
Carlos Amedee 372ecfe489 buildlet: add an AWS buildlet client
This change adds an AWS buildlet client which allows us to
create EC2 instances on AWS. With this change we have also
moved a portion of the gce creation logic into a helper
function which allows multiple clients to use it. Metadata
for the instances are stored in the user data fields.

The creation of a buildlet pool and modifications to
rundocker buildlet be made in order to enable this change.

Updates golang/go#36841

Change-Id: Ice03e1520513d51a02b9d66542e00012453bf0d9
Reviewed-on: https://go-review.googlesource.com/c/build/+/232077
Run-TryBot: Carlos Amedee <carlos@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Alexander Rakoczy <alex@golang.org>
2020-05-06 14:00:06 +00:00
Brad Fitzpatrick 4821e1d4e1 dashboard: rearrange tree, in prep for packagification
Package main binaries now go under cmd, leaving the top level for
similarly-named packages.

I'll be moving a lot of data structures and functions out of the
commands and into common packages.

A future CL will also unify all the "+build whatever" restrictions
into one common build tag, since there will be so much package sharing
coming up. Probably they will become "+build extdep", to indicate that
they have dependencies outside of x/tools.

Change-Id: Idc198e0dfa933b5f5de8f2b581533e8d299d2293
Reviewed-on: https://go-review.googlesource.com/2738
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-01-15 02:58:11 +00:00
Brad Fitzpatrick 74572355cd dashboard/buildlet: fix start-up crash when TLS attributes aren't set
I had never run the 44d7ecb402b7c on GCE, and never caught that it
crashed on start-up if TLS attributes weren't defined.

Updated to use the new NotDefinedError from the metadata package in
https://code-review.googlesource.com/#/c/1790/

Change-Id: Iaec8df126e4cef8026c930e8cc0163ae088affb3
Reviewed-on: https://go-review.googlesource.com/2736
Reviewed-by: Burcu Dogan <jbd@google.com>
2015-01-14 23:00:17 +00:00
Brad Fitzpatrick 6078e1087c dashboard/buildlet: optional TLS + password support
Change-Id: Id72301c1be8da12d2c31cbec6cc94f26dc5ad808
Reviewed-on: https://go-review.googlesource.com/2743
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-01-13 23:27:48 +00:00
Brad Fitzpatrick 04319633a9 dashboard/buildlet: set GOTESTONLY=std on plan9
This resulted in our first "ok" on the dashboard for Plan 9 with the
buildlet, in 19 minutes. It only runs the std tests, and nothing else
after that.

Update golang/go#9491

Change-Id: Iad77a594f83bfd3fa72596bcc3057645d9c9bb4c
Reviewed-on: https://go-review.googlesource.com/2523
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-01-09 02:11:53 +00:00
Brad Fitzpatrick 30ec06109b dashboard/buildlet: darwin support
Update golang/go#9495

Change-Id: I732cfdee952ad3bf0b3411d0ce45723900acedb4
Reviewed-on: https://go-review.googlesource.com/2472
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-01-08 04:26:01 +00:00
Brad Fitzpatrick 5a3fc03d55 dashboard/buildlet: add Makefiles, and add Windows stage0 bootstrap binary
Change-Id: I69938af38fb5c45c01598e9171e851a1c29790bc
Reviewed-on: https://go-review.googlesource.com/2268
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-01-05 01:32:49 +00:00
Brad Fitzpatrick 411cd8a1bf dashboard/buildlet: make exec handler return process state in HTTP trailer
Requires Go tip to function, but compiles with old versions of Go, but
without returning the trailer, which we'll be able to detect in the
coordinator to make sure nobody used an old Go to cross-compile a
buildlet.

Change-Id: Ie5f71c0a4477563dea5f1526af10a49aa41536d6
Reviewed-on: https://go-review.googlesource.com/2159
Reviewed-by: Andrew Gerrand <adg@golang.org>
2014-12-30 04:59:04 +00:00
Brad Fitzpatrick 9571310332 dashboard/buildlet: start of the buildlet
This is the basics: untar a tar.gz file to a directory, and execute a
command.

Update golang/go#8639
Update golang/go#8640
Update golang/go#8642

Change-Id: I5917ed8bd0e4c2fdb4b3fab34ca929caca95cc8a
Reviewed-on: https://go-review.googlesource.com/2180
Reviewed-by: Andrew Gerrand <adg@golang.org>
2014-12-30 00:39:57 +00:00