Joel Sing would like Heschi Kreinick and Dmitri Shuralyov to review this change.
env/openbsd-amd64: update build image script to OpenBSD 7.6
OpenBSD 7.6 has been released, meaning that the only two supported
versions are 7.5 and 7.6. Update the image build script for 7.6.
Additionally, bump the maxproc limit for the swarming user, which
will hopefully reduce the number of failures due to fork/exec
returning EAGAIN.
Updates golang/go#66474
Updates golang/go#69823
diff --git a/env/openbsd-amd64/README b/env/openbsd-amd64/README
index 6520b67..a552832 100644
--- a/env/openbsd-amd64/README
+++ b/env/openbsd-amd64/README
@@ -3,18 +3,18 @@
make.bash should be run on a Linux box with expect and qemu.
Debian packages: expect qemu-utils qemu-system-x86 growisofs genisoimage.
- VERSION=7.2 ARCH=amd64 ./make.bash
+ VERSION=7.6 ARCH=amd64 ./make.bash
After it completes, it creates a file openbsd-${VERSION}-${ARCH}-gce.tar.gz
Then:
- gsutil cp -a public-read openbsd-7.2-amd64-gce.tar.gz gs://go-builder-data/openbsd-amd64-72.tar.gz
+ gsutil cp -a public-read openbsd-7.6-amd64-gce.tar.gz gs://go-builder-data/openbsd-amd64-76.tar.gz
Or just use the web UI at:
https://console.developers.google.com/project/symbolic-datum-552/storage/browser/go-builder-data/
Then:
- gcloud compute --project symbolic-datum-552 images delete openbsd-amd64-72
- gcloud compute --project symbolic-datum-552 images create openbsd-amd64-72 --source-uri gs://go-builder-data/openbsd-amd64-72.tar.gz
+ gcloud compute --project symbolic-datum-552 images delete openbsd-amd64-76
+ gcloud compute --project symbolic-datum-552 images create openbsd-amd64-76 --source-uri gs://go-builder-data/openbsd-amd64-76.tar.gz
The VM needs to be run with the GCE metadata attribute "buildlet-binary-url" set to a URL
of the OpenBSD buildlet (cross-compiled, typically).
diff --git a/env/openbsd-amd64/make.bash b/env/openbsd-amd64/make.bash
index 12892f2..5322381 100755
--- a/env/openbsd-amd64/make.bash
+++ b/env/openbsd-amd64/make.bash
@@ -7,7 +7,7 @@
set -u
# Update to the version listed on https://openbsd.org
-readonly VERSION="${VERSION:-7.2}"
+readonly VERSION="${VERSION:-7.6}"
readonly RELNO="${VERSION/./}"
readonly SNAPSHOT=false
@@ -63,18 +63,17 @@
:vmemoryuse-cur=infinity: \
:memoryuse-max=infinity: \
:memoryuse-cur=infinity: \
- :maxproc-max=1024: \
- :maxproc-cur=1024: \
+ :maxproc-max=2048: \
+ :maxproc-cur=2048: \
:openfiles-max=4096: \
:openfiles-cur=4096: \
:tc=default:
EOLOGIN
usermod -L moreres swarming
syspatch
-# Run syspatch twice in case syspatch itself needs patching (this is the case with OpenBSD
-# 7.1: https://www.openbsd.org/errata71.html )
+# Run syspatch twice in case syspatch itself needs patching (this has been needed previously).
syspatch
-pkg_add -iv ${PKG_ADD_OPTIONS} bash curl git python3 sudo--gettext
+pkg_add -iv ${PKG_ADD_OPTIONS} bash curl git python%3 sudo--gettext
chown root:wheel /etc/sudoers
halt -p
EOF
@@ -124,7 +123,7 @@
EOF
chmod +x ${SITE}/install.site
mkdir -p ${SITE}/usr/local/bin
-CGO_ENABLED=0 GOOS=openbsd GOARCH=${ARCH/i386/386} go1.21.0 build -o ${SITE}/usr/local/bin/bootstrapswarm golang.org/x/build/cmd/bootstrapswarm
+CGO_ENABLED=0 GOOS=openbsd GOARCH=${ARCH/i386/386} go1.23.2 build -o ${SITE}/usr/local/bin/bootstrapswarm golang.org/x/build/cmd/bootstrapswarm
tar --mode a=rx,u=rwx --owner root:0 --group wheel:0 -C ${SITE} -zcf ${WORK}/site${RELNO}.tgz .
# Autoinstall script.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
pkg_add -iv ${PKG_ADD_OPTIONS} bash curl git python%3 sudo--gettextWhat's the effect of '%' here?
CGO_ENABLED=0 GOOS=openbsd GOARCH=${ARCH/i386/386} go1.23.2 build -o ${SITE}/usr/local/bin/bootstrapswarm golang.org/x/build/cmd/bootstrapswarm(minor) Now that the go.mod defines the minimum Go language version (and thus toolchain), there's less need to maintain the go version via the filename, and more viable to rely on 'go' being up-to-date enough or to select a newer version [if needed](https://go.dev/doc/toolchain#select). So consider changing this to just `go`. Also see a similar discussion [here](https://go-review.googlesource.com/c/build/+/616836/3..7/env/freebsd-amd64/make.bash#b134).
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +1 |
pkg_add -iv ${PKG_ADD_OPTIONS} bash curl git python%3 sudo--gettextWhat's the effect of '%' here?
It selects a specific branch of a package (search for 'pkgname%branch' on https://man.openbsd.org/pkg_add.1, for full details) - the python3 meta package was removed for OpenBSD 7.6, meaning that there is now python-2.7 and python-3.11. Using python%3 removes the ambiguity and selects python-3.11 now (and python-3.* for the future).
CGO_ENABLED=0 GOOS=openbsd GOARCH=${ARCH/i386/386} go1.23.2 build -o ${SITE}/usr/local/bin/bootstrapswarm golang.org/x/build/cmd/bootstrapswarm(minor) Now that the go.mod defines the minimum Go language version (and thus toolchain), there's less need to maintain the go version via the filename, and more viable to rely on 'go' being up-to-date enough or to select a newer version [if needed](https://go.dev/doc/toolchain#select). So consider changing this to just `go`. Also see a similar discussion [here](https://go-review.googlesource.com/c/build/+/616836/3..7/env/freebsd-amd64/make.bash#b134).
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Thanks.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
env/openbsd-amd64: update build image script to OpenBSD 7.6
OpenBSD 7.6 has been released, meaning that the only two supported
versions are 7.5 and 7.6. Update the image build script for 7.6.
Additionally, bump the maxproc limit for the swarming user, which
will hopefully reduce the number of failures due to fork/exec
returning EAGAIN.
Updates golang/go#66474
Updates golang/go#69823
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
pkg_add -iv ${PKG_ADD_OPTIONS} bash curl git python%3 sudo--gettextJoel SingWhat's the effect of '%' here?
It selects a specific branch of a package (search for 'pkgname%branch' on https://man.openbsd.org/pkg_add.1, for full details) - the python3 meta package was removed for OpenBSD 7.6, meaning that there is now python-2.7 and python-3.11. Using python%3 removes the ambiguity and selects python-3.11 now (and python-3.* for the future).
One of the documented requirements at https://go.dev/wiki/DashboardBuilders is that a python3 binary is present in PATH (sent CL 653735 to clarify). The new image fails to start up because that's no longer the case:
```
+ su -l swarming -c /usr/local/bin/bootstrapswarm --hostname golang-ciw-n1-openbsd-amd64-76-us-central1-b-0-m1cy --swarming chromium-swarm.appspot.com
2025/02/28 11:22:50 Bootstrapping the swarming bot with GCE authentication
2025/02/28 11:22:50 retrieving the GCE VM token
2025/02/28 11:22:50 Downloading the swarming bot
2025/02/28 11:22:50 Starting the swarming bot /home/swarming/.swarming/swarming_bot.zip
2025/02/28 11:22:50 command execution python3 /home/swarming/.swarming/swarming_bot.zip start_bot: exec: "python3": executable file not found in $PATH
+ echo giving up
giving up
```
@jo...@sing.id.au How would you suggest we resolve this? Thanks. We can continue on issue #69823 if that's easier.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
pkg_add -iv ${PKG_ADD_OPTIONS} bash curl git python%3 sudo--gettextJoel SingWhat's the effect of '%' here?
Dmitri ShuralyovIt selects a specific branch of a package (search for 'pkgname%branch' on https://man.openbsd.org/pkg_add.1, for full details) - the python3 meta package was removed for OpenBSD 7.6, meaning that there is now python-2.7 and python-3.11. Using python%3 removes the ambiguity and selects python-3.11 now (and python-3.* for the future).
One of the documented requirements at https://go.dev/wiki/DashboardBuilders is that a python3 binary is present in PATH (sent CL 653735 to clarify). The new image fails to start up because that's no longer the case:
```
+ su -l swarming -c /usr/local/bin/bootstrapswarm --hostname golang-ciw-n1-openbsd-amd64-76-us-central1-b-0-m1cy --swarming chromium-swarm.appspot.com
2025/02/28 11:22:50 Bootstrapping the swarming bot with GCE authentication
2025/02/28 11:22:50 retrieving the GCE VM token
2025/02/28 11:22:50 Downloading the swarming bot
2025/02/28 11:22:50 Starting the swarming bot /home/swarming/.swarming/swarming_bot.zip
2025/02/28 11:22:50 command execution python3 /home/swarming/.swarming/swarming_bot.zip start_bot: exec: "python3": executable file not found in $PATH
+ echo giving up
giving up
```@jo...@sing.id.au How would you suggest we resolve this? Thanks. We can continue on issue #69823 if that's easier.
That's rather strange - the python package installs /usr/local/bin/python3 and /usr/local/bin is included in the PATH that is exported before the su invocation (none of this really changed with the make.bash update). If I build the image and boot it everything appears to be correct.
Is there a chance that the image failed to build correctly and that the python package did not actually get installed?
The build output should include:
```
Adding python-3.11.10p1:libb2-0.98.1v0
python-3.11.10p1 (processing)
python-3.11.10p1 (extracting)
python-3.11.10p1 (skipping)
python-3.11.10p1 (installing)
```
Are you able to boot the image and see if /usr/local/bin/python3 exists (or provide a way to access the image so I can check)?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |