-
Notifications
You must be signed in to change notification settings - Fork 88
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
Add an option to wait for custom startup script to finish before launching the agent #346
base: develop
Are you sure you want to change the base?
Add an option to wait for custom startup script to finish before launching the agent #346
Conversation
// default value will be 0 until it finishes | ||
"exit $(systemctl show google-startup-scripts --property ExecMainExitTimestampMonotonic | cut -d \"=\" -f 2)", | ||
// not "initializing" or "starting" - benefit is doesn't require google-startup-scripts | ||
// "[ \"$(systemctl is-system-running)\" != \"starting\" ]", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we think it's better to check that google-startup-scripts
has finished or that systemctl is-system-running
does not return "initializing" or "starting"? Those seem to be the two best ways on my ubuntu 18/20 machines, but curious what others think here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @caseyduquettesc thank you. I think it's just fine to check google-startup-scripts
has finished.
When can this be merged? I was hoping I could use it pretty soon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will need a project maintainer to review. I'll try asking in the slack channel
72f47b5
to
a9137c6
Compare
Sorry for the direct ping, but @donmccasland or @alecharp do you know who would be best to review this? Thanks |
Is this a feature coming any time soon? We'd really love to have this feature as we currently hit a race condition where the pipeline starts building the agent before the startup script finishes logging in and breaks on first execution. |
This would be great. Our current workaround is to have the script stop sshd, then start it again at the end. Thank you! |
Any chance we could get codeowners to take a look at this PR? This feature would solve a lot of problems we're facing with setting up Jenkins on GCE |
Fixes #338
Adds a new option to the instance configuration that enables waiting to launch the agent until
google-startup-scripts
has finished running.Agent log - launcher checks startup status and it's already done
Agent log - launcher checks startup status and it's sleeping for 60s
Agent log - option disabled and launcher does not check startup status