config-perf: Simplify port-list implementation and fetch exactly needed nets/ips/VMs

Bug #1432767 reported by Hampapur Ajay
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Fix Committed
High
Hampapur Ajay
R2.0
Fix Committed
High
Hampapur Ajay
R2.1
Fix Committed
High
Hampapur Ajay

Bug Description

Instead of different callers of _port_list() gathering the needed nets/ips/VMs implement this fetch for memo needs within _port_list() definition. So a port list will always involve constant order round-trip times and the fetch is exactly for the data that is needed (fixes the bug where incorrectly all VMs were fetched in below snippet)

- for vmi_obj in all_port_objs:
- if vmi_obj.get_virtual_machine_refs():
- device_ids.append(vmi_obj.get_virtual_machine_refs()[0]['uuid'])
- port_net_objs, port_vm_objs = self._port_net_vm_project(project_id,
- device_ids)

Tags: config
Hampapur Ajay (hajay)
Changed in juniperopenstack:
assignee: nobody → Hampapur Ajay (hajay)
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : master

Review in progress for https://review.opencontrail.org/8380
Submitter: Hampapur Ajay (<email address hidden>)

Changed in juniperopenstack:
importance: Undecided → High
tags: added: config
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/8380
Committed: http://github.org/Juniper/contrail-controller/commit/551fcb96a6e42640996a73f70954407caf74343a
Submitter: Zuul
Branch: master

commit 551fcb96a6e42640996a73f70954407caf74343a
Author: Hampapur Ajay <email address hidden>
Date: Thu Mar 12 11:19:28 2015 -0700

config-perf: build up nets/ips/vms in _port_list with exact fetch

The different callers of _port_list() were building up virtual-networks,
instance-ips and virtual-machines (sometimes getting more than needed
from api-server) as a memo to be used within the request context.
Simplify this by having _port_list() do it and free callers up to
only pass needed ports to _port_list(). Use
a. list by obj_uuids for nets from port refs
b. list by back_ref_ids of ports for instance-ips
c. list by obj_uuids for VMs from port-refs (or port parent for
<1.06 based port creation)

Closes-Bug: #1432767

Change-Id: I77379b8919c96abf540b91ccc7fb43f5cc4e8e6c

Changed in juniperopenstack:
status: New → Fix Committed
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : R2.1

Review in progress for https://review.opencontrail.org/8528
Submitter: Hampapur Ajay (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : R2.0

Review in progress for https://review.opencontrail.org/8529
Submitter: Hampapur Ajay (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/8528
Committed: http://github.org/Juniper/contrail-controller/commit/37f7457fc60b30754256c9239fa51f5142ea8d1a
Submitter: Zuul
Branch: R2.1

commit 37f7457fc60b30754256c9239fa51f5142ea8d1a
Author: Hampapur Ajay <email address hidden>
Date: Thu Mar 12 11:19:28 2015 -0700

config-perf: build up nets/ips/vms in _port_list with exact fetch

The different callers of _port_list() were building up virtual-networks,
instance-ips and virtual-machines (sometimes getting more than needed
from api-server) as a memo to be used within the request context.
Simplify this by having _port_list() do it and free callers up to
only pass needed ports to _port_list(). Use
a. list by obj_uuids for nets from port refs
b. list by back_ref_ids of ports for instance-ips
c. list by obj_uuids for VMs from port-refs (or port parent for
<1.06 based port creation)

Closes-Bug: #1432767

Change-Id: I77379b8919c96abf540b91ccc7fb43f5cc4e8e6c
(cherry picked from commit 551fcb96a6e42640996a73f70954407caf74343a)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/8529
Committed: http://github.org/Juniper/contrail-controller/commit/071ead8e5276909d5ad40998e149fc5d62426977
Submitter: Zuul
Branch: R2.0

commit 071ead8e5276909d5ad40998e149fc5d62426977
Author: Hampapur Ajay <email address hidden>
Date: Thu Mar 12 11:19:28 2015 -0700

config-perf: build up nets/ips/vms in _port_list with exact fetch

The different callers of _port_list() were building up virtual-networks,
instance-ips and virtual-machines (sometimes getting more than needed
from api-server) as a memo to be used within the request context.
Simplify this by having _port_list() do it and free callers up to
only pass needed ports to _port_list(). Use
a. list by obj_uuids for nets from port refs
b. list by back_ref_ids of ports for instance-ips
c. list by obj_uuids for VMs from port-refs (or port parent for
<1.06 based port creation)

Closes-Bug: #1432767

Change-Id: I77379b8919c96abf540b91ccc7fb43f5cc4e8e6c
(cherry picked from commit 551fcb96a6e42640996a73f70954407caf74343a)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.