-
Notifications
You must be signed in to change notification settings - Fork 92
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
Improve network manager refresh speed #216
Improve network manager refresh speed #216
Conversation
This pull request is not mergeable. Please rebase and repush. |
7bcdaba
to
119a23b
Compare
119a23b
to
49475d5
Compare
end.compact | ||
end | ||
|
||
def cloud_subnets |
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.
@mansam do we have a targeted refresh spec around these? To make sure it doesn't duplicate any models?
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.
hm, I wonder if targeted refresh for subnets works correctly now, the way it is now, they were nested under cloud networks. So for targeted here https://github.com/Ladas/manageiq-providers-openstack/blob/4b784dec74860e678a660002c5d3fca93ace1e33/app/models/manageiq/providers/openstack/inventory/persister/target_collection.rb#L31
we would need to say subnets have parent_inventory_collections => :cloud_networks
and we would need to define :targeted_arel
that returns subnets of all referenced cloud_networks
network.maximum_transmission_unit = n["mtu"] | ||
network.cloud_tenant = persister.cloud_tenants.lazy_find(n["tenant_id"]) | ||
network.orchestration_stack = persister.orchestration_stacks.lazy_find(collector.orchestration_stack_by_resource_id(n["id"])) | ||
n["subnets"].each do |subnet_id| |
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.
Is it possible to model these as in AWS? Where networks and subnets are 2 separate collections? It would require subnet events for targeted refresh
This pull request is not mergeable. Please rebase and repush. |
49475d5
to
a8a5990
Compare
670b90b
to
e7994d5
Compare
This pull request is not mergeable. Please rebase and repush. |
e7994d5
to
780eb6d
Compare
Some comments on commits mansam/manageiq-providers-openstack@e263101~...780eb6d spec/models/manageiq/providers/openstack/network_manager/cloud_subnet_refresh_spec.rb
|
Checked commits mansam/manageiq-providers-openstack@e263101~...780eb6d with ruby 2.3.3, rubocop 0.52.0, haml-lint 0.20.0, and yamllint 1.10.0 **
app/models/manageiq/providers/openstack/network_manager/refresh_parser.rb
|
Not sure about @Ladas comment, otherwise looks good to me 👍 |
@aufi right, I think we should backport it, then everything will be awesome :-) |
Since this needs to be backported to Fine (ManageIQ/manageiq#16695) to fix the BZ, it should probably be backported to Gaprindashvili as well. |
@mansam If this PR can go to gaprindashvili as is, please add |
@simaishi It'll probably conflict so I'll open up a new PR for it |
Backported to Gaprindashvili via #251 |
Backported to Fine via ManageIQ/manageiq#16695 |
https://bugzilla.redhat.com/show_bug.cgi?id=1512703