golang / go

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

x/build/cmd/rundockerbuildlet: unable to start rundockerbuildlet on ppc64 #54782

Open pmur opened 2 years ago

pmur commented 2 years ago

What version of Go are you using (go version)?

$ go version
go version go1.18.5 linux/amd64

Does this issue reproduce with the latest release?

I have not tested.

What operating system and processor architecture are you using (go env)?

go env Output
debian@go-be-debian-1:~$ go env
GO111MODULE=""
GOARCH="ppc64"
GOBIN=""
GOCACHE="/home/debian/.cache/go-build"
GOENV="/home/debian/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="ppc64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/debian/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/debian/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/lib/go-1.19"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go-1.19/pkg/tool/linux_ppc64"
GOVCS=""
GOVERSION="go1.19"
GCCGO="gccgo"
GOPPC64="power8"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="0"
GOMOD="/dev/null"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build2889172257=/tmp/go-build -gno-record-gcc-switches"

What did you do?

I built the latest version of rundockerbuildlet on my amd64 dev machine.

GOARCH=ppc64 GOOS=linux /usr/bin/go build -o rundockerbuildlet.ppc64 golang.org/x/build/cmd/rundockerbuildlet

I created a systemd unit file to run rundockerbuildlet similar to other PPC64 builders, and the utility fails to start with the following error:

Aug 30 20:30:39 go-be-debian-1 systemd[1]: Started Run Buildlets in Docker.
░░ Subject: A start job for unit rundockerbuildlet.service has finished successfully
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ A start job for unit rundockerbuildlet.service has finished successfully.
░░ 
░░ The job identifier is 4777.
Aug 30 20:30:40 go-be-debian-1 rundockerbuildlet[330779]: 2022/08/30 20:30:40 unable to retrieve EC2 user data: EC2MetadataError: failed to make EC2Metadata request
Aug 30 20:30:40 go-be-debian-1 rundockerbuildlet[330779]:         status code: 404, request id:
Aug 30 20:30:40 go-be-debian-1 rundockerbuildlet[330779]: caused by: 404 Not Found
Aug 30 20:30:40 go-be-debian-1 rundockerbuildlet[330779]: The resource could not be found.
Aug 30 20:30:40 go-be-debian-1 rundockerbuildlet[330779]:    

What did you expect to see?

This builder is not running on AWS. I wouldn't expect to see AWS related chatter causing a failure to start.

What did you see instead?

The usual startup and status information for this utility.

pmur commented 2 years ago

Also, the relevant systemd line for starting.

ExecStart=/usr/local/bin/rundockerbuildlet -basename=power_ -image=golang/buildlet-stage0 -n=5 -cpu=4 -memory=6g --env=host-linux-ppc64-sid
heschi commented 2 years ago

That error suggests that the program has successfully connected to an EC2 metadata server for the purposes of onEC2 but then failed to actually read the EC2 metadata. I assume these machines are not AWS machines so I don't know why that would be. Sorry.

cc @golang/release