-
Notifications
You must be signed in to change notification settings - Fork 900
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
Filter undercloud resource query for performance #13004
Filter undercloud resource query for performance #13004
Conversation
@Ladas can you do a sanity check to see if this updated query breaks something I haven't thought of? Looking at the refresh code it should still provide everything needed, but... |
# To further speed up the query we only search for those resources we care about - those whose | ||
# physical_resource_id matches the id of a nova server | ||
server_ids = servers.map{|s| s.id} | ||
@orchestration_service.list_resources(:stack => stack, :nested_depth => 50, :physical_resource_id => server_ids).body['resources'] |
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.
make sense, cause the resources are really filtered later to %w(OS::TripleO::Server OS::Nova::Server).include?(x["resource_type"])
so we don't need the rest
The API doesn't support filtering by resource_type?
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.
@Ladas it does, but there's no speed improvement, whereas this filter reduced the time of the query considerably
looks great 👍 seems like filtering using :resource_type would be better, but it's probably not done on the DB level (on OpenStack side), since it doesn't bring any speedup. Solution here brings the desired speedup, so it's good. :-) |
@miq-bot assign @blomquisg |
…-refresh-fix Filter undercloud resource query for performance (cherry picked from commit 0391e6d) https://bugzilla.redhat.com/show_bug.cgi?id=1402028
Euwe Backport details: $ git log -1
commit 774ba3123d5f9d081371077846cb4e0a2bfd7f7d
Author: Adam Grare <[email protected]>
Date: Tue Dec 6 10:47:17 2016 -0500
Merge pull request #13004 from tzumainn/openstack-infra-orchestration-refresh-fix
Filter undercloud resource query for performance
(cherry picked from commit 0391e6d6c41d89d77d22110e5b0d6ebe9427c84b)
https://bugzilla.redhat.com/show_bug.cgi?id=1402028 |
The openstack infra refresher queries the nested stack resources of the undercloud,
which can take a long time and even timeout. This fix adds a filter to the query, reducing
the running time from over a minute to less than ten seconds.
https://bugzilla.redhat.com/show_bug.cgi?id=1402028