golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
122.88k stars 17.52k forks source link

x/build: add LUCI plan9-386 builder #63599

Open 0intro opened 11 months ago

0intro commented 11 months ago
cagedmantis commented 11 months ago

@golang/release

gopherbot commented 11 months ago

Change https://go.dev/cl/536196 mentions this issue: main.star: add plan9-{386, amd64, arm} builders

cagedmantis commented 10 months ago

Here is the certificate: plan9-386-1698265768.cert.txt

0intro commented 10 months ago

Thank you for the certificate.

I've tried to launch the swarming bot, but I came across this error:

$ luci_machine_tokend -backend luci-token-server.appspot.com -cert-pem plan9-386.crt -pkey-pem plan9-386.key -token-file=$HOME/lib/luci_machine_tokend/token.json
[I2023-11-10T19:22:20.630093+01:00 822864 0 iface.go:167] tsmon is disabled because no endpoint is configured
[I2023-11-10T19:22:20.630912+01:00 822864 0 main.go:237] The token is valid, skipping the update
$ bootstrapswarm -token-file-path $HOME/lib/luci_machine_tokend/token.json -hostname plan9-386
2023/11/10 19:22:24 Bootstrapping the swarming bot with certificate authentication
2023/11/10 19:22:24 retrieving the luci-machine-token from the token file
2023/11/10 19:22:24 Downloading the swarming bot
2023/11/10 19:22:25 Starting the swarming bot /home/djc/.swarming/swarming_bot.zip
822925 2023-11-10 18:22:26.773 E: Request to https://chromium-swarm.appspot.com/swarming/api/v1/bot/handshake failed with HTTP status code 403: 403 Client Error: Forbidden for url: https://chromium-swarm.appspot.com/swarming/api/v1/bot/handshake
822925 2023-11-10 18:22:26.773 E: Failed to contact for handshake, retrying in 0 sec...

Is there something I'm doing wrong?

Also, since we can't run Python on Plan 9, the idea is to run the swarming bot on a Linux machine, which will run the command on a remote Plan 9 instance (like ssh glenda@plan9 ls /). Can the swarming bot be used this way? Maybe there is a similar approach to run the Go tests on Android.

Thanks.

0intro commented 10 months ago

CC @millerresearch

0intro commented 8 months ago

Here is an update of how far the swarming bot goes currently.

I don't have the API error anymore. The swarming bot is starting successfully, then waits forever. After 4m, it tries to restart the machine.

$ export LUCI_MACHINE_TOKEN=$HOME/lib/luci_machine_tokend/token.json
$ export SWARMING_ALLOW_ANY_USER=x
$ export SWARMING_NEVER_REBOOT=x
$ bootstrapswarm -hostname plan9-386
2024/01/19 21:40:19 Bootstrapping the swarming bot with certificate authentication
2024/01/19 21:40:19 retrieving the luci-machine-token from the token file /home/djc/lib/luci_machine_tokend/token.json (via LUCI_MACHINE_TOKEN env var)
2024/01/19 21:40:19 Downloading the swarming bot
2024/01/19 21:40:20 Starting the swarming bot /home/djc/.swarming/swarming_bot.zip
sudo: a password is required
2081809 2024-01-19 20:44:20.315 E: Failed to run sudo -n /sbin/shutdown -r now: Command '['sudo', '-n', '/sbin/shutdown', '-r', 'now']' returned non-zero exit status 1.
sudo: a password is required
2081809 2024-01-19 20:44:20.320 E: Failed to run sudo -n /sbin/reboot -f: Command '['sudo', '-n', '/sbin/reboot', '-f']' returned non-zero exit status 1.
2081809 2024-01-19 20:49:20.271 E: post_error(Host is stuck rebooting for: Periodic reboot after 6560899s)
dmitshur commented 7 months ago

Thanks for trying again and confirming the API error isn't happening by now.

Did you have a chance to see your bot at https://chromium-swarm.appspot.com/botlist while it was connected, and what dimensions it reported? (Most relevant is the cipd_platform dimension.)

The attempted "Periodic reboot" seems unexpected, SWARMING_NEVER_REBOOT being set in the environment should've disabled it as I understand. For completeness, what's the version of bootstrapswarm?

0intro commented 7 months ago

bootstrapswarm is the latest version from the golang.org/x/build repository.

I can see the bot successfully on https://chromium-swarm.appspot.com/bot?id=plan9-386.

cipd_platform is linux-amd64, which is expected, since the goal would be to run the bot on a Linux machine and send remote commands to the Plan 9 machine through SSH.

0intro commented 3 months ago

The LUCI plan9-386 builder is showing its first successful build.

https://chromium-swarm.appspot.com/task?id=6a027c77e5910d10

dmitshur commented 3 months ago

Congrats on the progress!

On the corresponding build page (https://ci.chromium.org/b/8745946740583765537), oddly, there are 31 failing test result entries (and 2901 passing) despite the overall build status being "succeeded".

A frequent error in the logs appears to be "go: creating work dir: stat /home/swarming/tmp: '/home/swarming/tmp' file does not exist".

0intro commented 3 months ago

Thanks for noticing. I'll investigate.

0intro commented 3 months ago

I think it should be fixed now.

https://ci.chromium.org/ui/p/golang/builders/ci/x_time-gotip-plan9-386/

gopherbot commented 3 weeks ago

Change https://go.dev/cl/608155 mentions this issue: main.star: unset known issues for plan9/{386,arm} builder types