-
Notifications
You must be signed in to change notification settings - Fork 100
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
RUN-2448: ENH: Ansible plugin performance issue #368
Conversation
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, i think we should use the snakeyaml version 2.2 to match the one used in rundeck
https://github.com/rundeck/rundeck/blob/main/gradle.properties#L36
Also could you expand a little on why is the property "duplicate_dict_key=ignore" is needed? would this require to update the docs also?
and finally, with this change it only improves when you use have gather facts false?
src/main/groovy/com/rundeck/plugins/ansible/ansible/AnsibleInventoryList.java
Show resolved
Hide resolved
we will also need to add a functional test for this case |
src/main/groovy/com/rundeck/plugins/ansible/plugin/AnsibleResourceModelSource.java
Outdated
Show resolved
Hide resolved
78c8576
to
3fcdfa0
Compare
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 think the exception handling needs to be improved, right now we are loosing too much info when suppressing exceptions (not throwing or not logging the exception and just logging the message).
It would be good to know how rundeck handles exceptions when being thrown from the plugin
src/main/groovy/com/rundeck/plugins/ansible/plugin/AnsibleResourceModelSource.java
Outdated
Show resolved
Hide resolved
src/main/groovy/com/rundeck/plugins/ansible/plugin/AnsibleResourceModelSource.java
Outdated
Show resolved
Hide resolved
src/main/groovy/com/rundeck/plugins/ansible/plugin/AnsibleResourceModelSource.java
Outdated
Show resolved
Hide resolved
src/main/groovy/com/rundeck/plugins/ansible/ansible/AnsibleInventoryList.java
Outdated
Show resolved
Hide resolved
what was the config that the client reporting the issue had? gather facts true or false? |
The client had gather facts false. |
|
Exception handler process changed |
src/main/groovy/com/rundeck/plugins/ansible/plugin/AnsibleResourceModelSource.java
Outdated
Show resolved
Hide resolved
Tested and worked OK. Just needs those minor adjustments. |
Changed to: "Gather fresh facts before importing? (Not recommended for large inventories)" |
Dismissing as Luis is unavailable to approve.
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
⛔️ Ticket:
https://pagerduty.atlassian.net/browse/RUN-2448
❌ Issue:
The method getNodes consume a lot CPU and RAM when it tries to process all Ansible nodes and converting them into Rundeck nodes.
✅ Solution:
When Gather Facts is set to false another Ansible command (ansible-inventory) is applied to bring in the nodes and convert them to Rundeck format. These nodes, now transformed, will have much less information but will not consume large CPU and RAM resources, which is what happened with the previous playbook when Gather Facts is true. In addition, in the file ansible.cfg it has to change this property to "duplicate_dict_key=ignore"
Documentation PR:
rundeck/docs#1490