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/cmd/coordinator: give buildlets access to suspend themselves for N seconds #36105

Open
bradfitz opened this issue Dec 12, 2019 · 0 comments
Labels
Builders x/build issues (builders, bots, dashboards) FeatureRequest NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. Testing An issue that has been verified to require only test changes, not just a test failure.
Milestone

Comments

@bradfitz
Copy link
Contributor

Watching the debugging in #35482 (including people running out to buy laptops), I realize we could probably provide some help in the build system.

GCE VMs support suspend:

https://cloud.google.com/sdk/gcloud/reference/alpha/compute/instances/suspend

gcloud alpha compute instances suspend is used to suspend a Google Compute Engine virtual machine. Suspending a VM is the equivalent of sleep or standby mode: the guest receives an ACPI S3 suspend signal, after which all VM state is saved to temporary storage

So we could have the coordinator do that suspend on behalf of buildlets, followed by a resume in the {buildlet/user/test}-requested duration.

I figure we'd pass an environment variable to tests containing a URL containing a secret build-specific secret, and tests could hit that URL with a seconds parameter to say how long they'd like to be suspended.

We'd need to also suspend the buildlet health checking on the coordinator side so they don't fail health checks and get killed.

This would permit writing unit tests that test program time vs real time, at least in longtest mode.

I assume this would be useful, @aclements, @ianlancetaylor?

/cc @golang/osp-team

@bradfitz bradfitz added Testing An issue that has been verified to require only test changes, not just a test failure. FeatureRequest labels Dec 12, 2019
@gopherbot gopherbot added this to the Unreleased milestone Dec 12, 2019
@gopherbot gopherbot added the Builders x/build issues (builders, bots, dashboards) label Dec 12, 2019
@toothrot toothrot added the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label Dec 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Builders x/build issues (builders, bots, dashboards) FeatureRequest NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. Testing An issue that has been verified to require only test changes, not just a test failure.
Projects
None yet
Development

No branches or pull requests

3 participants