Closed
Description
Go version
HEAD
Output of go env
in your module/workspace:
GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/home/iant/.cache/go-build'
GOENV='/home/iant/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/home/iant/gopath/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/iant/gopath'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org'
GOROOT='/home/iant/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/home/iant/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='devel go1.24-bae2e968e2 Mon Sep 30 22:04:40 2024 +0000'
GODEBUG=''
GOTELEMETRY='on'
GOTELEMETRYDIR='/home/iant/.config/go/telemetry'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/home/iant/gopath/src/golang.org/x/tools/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build4106496375=/tmp/go-build -gno-record-gcc-switches'
What did you do?
> gomote create x_tools-gotip-netbsd-arm64
> gomote ssh iant-x_tools-gotip-netbsd-arm64-0
What did you see happen?
unable to start shell "": exec: no command
What did you expect to see?
I expected to be connected to the gomote
CC @golang/release
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done
Relationships
Development
No branches or pull requests
Activity
gabyhelp commentedon Nov 1, 2024
Related Issues and Documentation
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)
ianlancetaylor commentedon Nov 1, 2024
CC @golang/release
ianlancetaylor commentedon Nov 1, 2024
The same happens for a plain gotip-netbsd-arm64 gomote.
dmitshur commentedon Nov 2, 2024
Thanks for reporting. Also CC @golang/netbsd.
ssh.go#L52 calls
shell()
to determine the command name, and on GOOS=netbsd, its implementation returns whatever theSHELL
environment variable is set to:https://cs.opensource.google/go/x/build/+/master:cmd/buildlet/buildlet.go;l=2041-2042;drc=0d31c9b6e4b5ca7b9505a983bd19ae246447f8ad
Unsurprisingly given the error, that environment variable isn't currently set on this builder:
I see that
bash
is available on the builder, and in PATH, so settingSHELL
tobash
in the environment of the swarming client might be all that's needed to letgomote ssh
work on this builder. CC @bsiegert as the builder owner who would need to make that change.An (inconvenient) workaround is to use
gomote run
, e.g.:bsiegert commentedon Nov 2, 2024
I can set the SHELL environment variable. There is at least bash and ksh available.
luci_swarm: set SHELL environment variable
ianlancetaylor commentedon Nov 4, 2024
Can we change the
shell
function to return a reasonable default ifSHELL
is not set in the environment? Using/bin/sh
would be far better than completely failing.gopherbot commentedon Nov 4, 2024
Change https://go.dev/cl/624796 mentions this issue:
cmd/buildlet: set a safe default for shell
cmd/buildlet: set a safe default for shell