-
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
Add a connection to the pool if there is only one for embedded ansible #16477
Add a connection to the pool if there is only one for embedded ansible #16477
Conversation
…ble worker Before ManageIQ#6786 we used to have one connection specified in the connection pool in database.yml Installations which have been upgraded from before this change still have that one connection pool in place. The EmbeddedAnsible worker uses a thread rather than a new process so it shares the connection pool with the server. When the pool is set to only contain one connection, the EmbeddedAnsible worker will not be able to start. This commit adds a connection to the pool in the same way that we do for workers which specify a specific connection pool size in their settings: https://github.com/ManageIQ/manageiq/blob/f6f7120749d16fd7825f83001dfd875cdecb903c/app/models/miq_worker/runner.rb#L71-L78 https://bugzilla.redhat.com/show_bug.cgi?id=1484150
Checked commit carbonin@a3f50f1 with ruby 2.3.3, rubocop 0.47.1, haml-lint 0.20.0, and yamllint 1.10.0 |
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.
I savagely approve of this surgical change. It's better than visiting "hunert" appliances.
…edded_ansible Add a connection to the pool if there is only one for embedded ansible (cherry picked from commit 57b5da5) https://bugzilla.redhat.com/show_bug.cgi?id=1513631
Gaprindashvili backport details:
|
…edded_ansible Add a connection to the pool if there is only one for embedded ansible (cherry picked from commit 57b5da5) https://bugzilla.redhat.com/show_bug.cgi?id=1514139
Fine backport details:
|
…_for_embedded_ansible Add a connection to the pool if there is only one for embedded ansible (cherry picked from commit 57b5da5) https://bugzilla.redhat.com/show_bug.cgi?id=1514139
Before #6786 we used to have one connection specified in the connection pool in database.yml
Installations which have been upgraded from before this change still have that one connection pool in place.
The EmbeddedAnsible worker uses a thread rather than a new process so it shares the connection pool with the server. When the pool is set to only contain one connection, the EmbeddedAnsible worker will not be able to start.
This commit adds a connection to the pool in the same way that we do for workers which specify a specific connection pool size in their settings:
manageiq/app/models/miq_worker/runner.rb
Lines 71 to 78 in f6f7120
https://bugzilla.redhat.com/show_bug.cgi?id=1484150