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

Feature request: Option to delay agent connection to allow custom startup script to finish #338

Open
caseyduquettesc opened this issue Jun 28, 2022 · 3 comments · May be fixed by #346
Open
Labels
enhancement New feature or request

Comments

@caseyduquettesc
Copy link

caseyduquettesc commented Jun 28, 2022

What feature do you want to see added?

Currently, you can specify a custom startup script. This startup script may still be running when the agent starts and begins to process builds. Depending on how critical that script is, the build may be dependent on what that script does. For example, if that script rsyncs a gcs bucket, or even mounts an external drive with a git snapshot and is checked for consistency, the first build or two might fail.

Ideally, the agent wouldn't start until the google-startup-scripts has finished, but I would also be okay with just a configurable delay/sleep setting. If I could ask the plugin to wait 60 seconds or something before launching the agent, I'd be happy.

# systemctl status google-startup-scripts
● google-startup-scripts.service - Google Compute Engine user startup scripts
   Loaded: loaded (/lib/systemd/system/google-startup-scripts.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Tue 2022-06-28 02:34:54 UTC; 8min ago
  Process: 9211 ExecStart=/usr/share/google/run-startup-scripts (code=exited, status=0/SUCCESS)
 Main PID: 9211 (code=exited, status=0/SUCCESS)

Upstream changes

No response

@caseyduquettesc caseyduquettesc added the enhancement New feature or request label Jun 28, 2022
@bini-dere
Copy link

This would be a good feature as I use a startup script to install Java to the agent.
Agent provisioning is failing with WARNING: Java is not installed at java

@caseyduquettesc
Copy link
Author

I'll start working on this

@caseyduquettesc
Copy link
Author

I noticed the workaround they use in the integration tests

/etc/init.d/ssh stop
...
/etc/init.d/ssh start

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants