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
modules: zypper: Optimize the 'search' subcommand #37191
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When looking for installed packages we do not need to query repositories since we only care about the rpmdb. As such, we can disable all the repositories operations in order to improve the performance of that step Before this patch, when using 'state: present' in the zypper module, the operation was taking about 12 seconds to complete: time ansible-playbook foo.yml 1>/dev/null real 0m12.614s user 0m10.880s sys 0m0.683s After this patch: time ansible-playbook foo.yml 1>/dev/null real 0m4.193s user 0m2.560s sys 0m0.575s see: https://bugzilla.opensuse.org/show_bug.cgi?id=1084525
ansibot
added
community_review
In order to be merged, this PR must follow the community review workflow.
feature
This issue/PR relates to a feature request.
module
This issue/PR relates to a module.
needs_triage
Needs a first human triage before being processed.
new_contributor
This PR is the first contribution by a new community member.
performance
support:community
This issue/PR relates to code supported by the Ansible community.
labels
Mar 8, 2018
andytom
approved these changes
Mar 8, 2018
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.
shipit
ansibot
removed
the
needs_triage
Needs a first human triage before being processed.
label
Mar 8, 2018
openstack-gerrit
pushed a commit
to openstack/openstack-ansible-tests
that referenced
this pull request
Mar 8, 2018
Similar to the CentOS case, we should use 'present' instead of 'latest' for the package state so we don't spend time resolving dependencies, querying repos etc. The 'present' state can be further improved either in the zypper itself or in the Ansible module. Change-Id: I44fae44030af1c9ee88dcc26c6b55c91a2531926 Link: ansible/ansible#37191 Link: https://bugzilla.opensuse.org/show_bug.cgi?id=1084525
Tested and LGTM |
ansibot
added
automerge
This PR was automatically merged by ansibot.
shipit
This PR is ready to be merged by Core
and removed
community_review
In order to be merged, this PR must follow the community review workflow.
labels
Mar 9, 2018
hwoarang
added a commit
to hwoarang/ansible
that referenced
this pull request
Mar 9, 2018
When looking for installed packages we do not need to query repositories since we only care about the rpmdb. As such, we can disable all the repositories operations in order to improve the performance of that step Before this patch, when using 'state: present' in the zypper module, the operation was taking about 12 seconds to complete: time ansible-playbook foo.yml 1>/dev/null real 0m12.614s user 0m10.880s sys 0m0.683s After this patch: time ansible-playbook foo.yml 1>/dev/null real 0m4.193s user 0m2.560s sys 0m0.575s see: https://bugzilla.opensuse.org/show_bug.cgi?id=1084525 (cherry picked from commit 5234b78)
hwoarang
added a commit
to hwoarang/ansible
that referenced
this pull request
Mar 9, 2018
When looking for installed packages we do not need to query repositories since we only care about the rpmdb. As such, we can disable all the repositories operations in order to improve the performance of that step Before this patch, when using 'state: present' in the zypper module, the operation was taking about 12 seconds to complete: time ansible-playbook foo.yml 1>/dev/null real 0m12.614s user 0m10.880s sys 0m0.683s After this patch: time ansible-playbook foo.yml 1>/dev/null real 0m4.193s user 0m2.560s sys 0m0.575s see: https://bugzilla.opensuse.org/show_bug.cgi?id=1084525 (cherry picked from commit 5234b78)
openstack-gerrit
pushed a commit
to openstack/openstack-ansible-tests
that referenced
this pull request
Mar 14, 2018
Similar to the CentOS case, we should use 'present' instead of 'latest' for the package state so we don't spend time resolving dependencies, querying repos etc. The 'present' state can be further improved either in the zypper itself or in the Ansible module. Change-Id: I44fae44030af1c9ee88dcc26c6b55c91a2531926 Link: ansible/ansible#37191 Link: https://bugzilla.opensuse.org/show_bug.cgi?id=1084525 (cherry picked from commit 1f2ab67)
openstack-gerrit
pushed a commit
to openstack/openstack-ansible
that referenced
this pull request
Mar 15, 2018
Similar to the CentOS case, we should use 'present' instead of 'latest' for the package state so we don't spend time resolving dependencies, querying repos etc. The 'present' state can be further improved either in the zypper itself or in the Ansible module. Link: ansible/ansible#37191 Link: https://bugzilla.opensuse.org/show_bug.cgi?id=1084525 Change-Id: I8a6598013714e468d19f4984288d2c746515b5ca
nitzmahone
pushed a commit
that referenced
this pull request
Apr 9, 2018
When looking for installed packages we do not need to query repositories since we only care about the rpmdb. As such, we can disable all the repositories operations in order to improve the performance of that step Before this patch, when using 'state: present' in the zypper module, the operation was taking about 12 seconds to complete: time ansible-playbook foo.yml 1>/dev/null real 0m12.614s user 0m10.880s sys 0m0.683s After this patch: time ansible-playbook foo.yml 1>/dev/null real 0m4.193s user 0m2.560s sys 0m0.575s see: https://bugzilla.opensuse.org/show_bug.cgi?id=1084525 (cherry picked from commit 5234b78)
abadger
pushed a commit
that referenced
this pull request
Apr 9, 2018
When looking for installed packages we do not need to query repositories since we only care about the rpmdb. As such, we can disable all the repositories operations in order to improve the performance of that step Before this patch, when using 'state: present' in the zypper module, the operation was taking about 12 seconds to complete: time ansible-playbook foo.yml 1>/dev/null real 0m12.614s user 0m10.880s sys 0m0.683s After this patch: time ansible-playbook foo.yml 1>/dev/null real 0m4.193s user 0m2.560s sys 0m0.575s see: https://bugzilla.opensuse.org/show_bug.cgi?id=1084525 (cherry picked from commit 5234b78)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
automerge
This PR was automatically merged by ansibot.
feature
This issue/PR relates to a feature request.
module
This issue/PR relates to a module.
new_contributor
This PR is the first contribution by a new community member.
packaging
Packaging category
performance
shipit
This PR is ready to be merged by Core
support:community
This issue/PR relates to code supported by the Ansible community.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When looking for installed packages we do not need to query
repositories since we only care about the rpmdb. As such, we can
disable all the repositories operations in order to improve the
performance of that step
Before this patch, when using 'state: present' in the zypper module,
the operation was taking about 12 seconds to complete:
time ansible-playbook foo.yml 1>/dev/null
real 0m12.614s
user 0m10.880s
sys 0m0.683s
After this patch:
time ansible-playbook foo.yml 1>/dev/null
real 0m4.193s
user 0m2.560s
sys 0m0.575s
see:
https://bugzilla.opensuse.org/show_bug.cgi?id=1084525
SUMMARY
ISSUE TYPE
COMPONENT NAME
ANSIBLE VERSION
ADDITIONAL INFORMATION