Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/build: FreeBSD images don't shut down nicely #22895

Closed
bradfitz opened this issue Nov 28, 2017 · 4 comments
Closed

x/build: FreeBSD images don't shut down nicely #22895

bradfitz opened this issue Nov 28, 2017 · 4 comments
Labels
Builders x/build issues (builders, bots, dashboards) FrozenDueToAge help wanted OS-FreeBSD
Milestone

Comments

@bradfitz
Copy link
Contributor

I noticed while testing my images for #19303 and #22854 that our FreeBSD images (at least 10.3) don't have shutdown in their path:

2017/11/28 00:06:26 About to hit http://10.240.0.22 to see if buildlet is up yet...
2017/11/28 00:06:27 buildlet probe: 200 OK
2017/11/28 00:06:27 WorkDir: /tmp/workdir, <nil>
2017/11/28 00:06:27 done.
2017/11/28 00:06:27 SERIAL: 2017/11/28 00:06:27 Halting in 1 second.
2017/11/28 00:06:28 SERIAL: 2017/11/28 00:06:28 Halting machine.
                            2017/11/28 00:06:28 Shutdown: exec: "shutdown": executable file not found in $PATH
                            2017/11/28 00:06:28 Ending buildlet process post-halt
                            eval: poweroff: not found
                            Configuring syscons: blanktime.
                            Starting sendmail_submit.
                            Starting sendmail_msp_queue.
                            Starting cron.
                            Starting background file system checks in 60 seconds.
                            
                            Tue Nov 28 00:06:28 UTC 2017
                            
                            FreeBSD/amd64 (buildlet) (ttyu0)
                            
                            login:

The cmd/buildlet code is trying to do:

        case "freebsd":
                // Power off (-p), via halt (-o), now.                                                                                                                                                                                                                                                                               
                err = exec.Command("shutdown", "-p", "-o", "now").Run()

Maybe it needs an explicit path.

/cc @paulzhol

@gopherbot gopherbot added this to the Unreleased milestone Nov 28, 2017
@gopherbot gopherbot added the Builders x/build issues (builders, bots, dashboards) label Nov 28, 2017
@paulzhol
Copy link
Member

@bradfitz yes, it should be /sbin/shutdown and the rc script sets a PATH without /sbin.
Similarly the eval: poweroff: not found complains about this line in the rc script.

@gopherbot
Copy link

Change https://golang.org/cl/80335 mentions this issue: env/freebsd-amd64: disable boot prompt and logo

@paulzhol paulzhol self-assigned this Nov 28, 2017
gopherbot pushed a commit to golang/build that referenced this issue Nov 28, 2017
Use /boot/loader.conf from the official FreeBSD GCE image.
Add /sbin to the PATH environment variable buildlet is running with,
so that poweroff and shutdown are found.

Fixes golang/go#22894
Updates golang/go#22895

Change-Id: I2f8b56ff7df4726e4f8ef72357934f2f7abb8e59
Reviewed-on: https://go-review.googlesource.com/80335
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
@gopherbot
Copy link

Change https://golang.org/cl/80304 mentions this issue: dashboard: rebuild FreeBSD VM to avoid 10 second boot prompt

gopherbot pushed a commit to golang/build that referenced this issue Nov 28, 2017
FreeBSD VMs boot up 10 seconds faster now, and shut down faster.

Updates golang/go#22894
Updates golang/go#22895

Change-Id: I8eef979fc43d95d3c03104a761e70ec5737a3a97
Reviewed-on: https://go-review.googlesource.com/80304
Reviewed-by: Andrew Bonventre <andybons@golang.org>
@gopherbot
Copy link

Change https://golang.org/cl/82896 mentions this issue: env/freebsd-amd64: run buildlet daemonized under a non-privileged user

@golang golang locked and limited conversation to collaborators Sep 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Builders x/build issues (builders, bots, dashboards) FrozenDueToAge help wanted OS-FreeBSD
Projects
None yet
Development

No branches or pull requests

3 participants