-
Notifications
You must be signed in to change notification settings - Fork 898
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
Move embedded ansible worker thread up to start_runner #14256
Move embedded ansible worker thread up to start_runner #14256
Conversation
Checked commits jrafanie/manageiq@18ffca9~...bba7fbf with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
@carbonin graciously tested this branch 🙇 and it looked good for him. @Fryguy @gtanzillo I believe this is ready for final review/merge |
@@ -1204,6 +1204,7 @@ | |||
:starting_timeout: 10.minutes | |||
:stopping_timeout: 10.minutes | |||
:embedded_ansible_worker: | |||
:starting_timeout: 20.minutes |
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.
In my tests on a VM running in workstation with 6GB of RAM and no other workers running the initial configuration took about 7 minutes and the subsequent starts took about 1 minute.
I'm okay with this value, but we could probably make it smaller if we have a good reason to.
Thoughts?
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.
Yeah, I don't know. As long as this timeout is used for the initial setup, a task that has a variable number of things it does, I'd be concerned with having ansible workers that can never start. I'd rather be cautious 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.
LGTM, but I was partially involved. @gtanzillo Please merge if you are good with this.
This is a followup to feedback in #14053 and was implemented with @carbonin's and @Fryguy 's extensive help:
start_runner
, the same placemiq_worker.rb
usesfork
do_work_loop
and just use the base class's versiondo_exit
overriding by using the long forgottenbefore_exit
hook (at least forgotten by me)do_work
by overridingheartbeat
to only callsuper
if it's alive