From 446d433f6fea7624acae371189239a82c94ad455 Mon Sep 17 00:00:00 2001 From: Trey Morris Date: Thu, 17 Apr 2014 21:21:13 -0500 Subject: [PATCH] Ensure info cache updates don't overwhelm cells Cells does its own healing of the info cache outside of get_instance_nw_info, so we have double healing happening if info_cache_cells_update is called for every get_instance_nw_info. This also overwhelms cells' ability to keep the global db updated at scale. Similar functionality exists in nova/network/api.py. Change-Id: I58f681f3674d826e3dce4fa956e2eb0e4c60f82b --- nova/network/neutronv2/api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nova/network/neutronv2/api.py b/nova/network/neutronv2/api.py index 8ad277d99f71..ec35572a8bc5 100644 --- a/nova/network/neutronv2/api.py +++ b/nova/network/neutronv2/api.py @@ -454,7 +454,6 @@ class API(base_api.NetworkAPI): """Return the port for the client given the port id.""" return neutronv2.get_client(context).show_port(port_id) - @base_api.refresh_cache def get_instance_nw_info(self, context, instance, networks=None, port_ids=None, use_slave=False): """Return network information for specified instance @@ -465,6 +464,8 @@ class API(base_api.NetworkAPI): # the master. For now we just ignore this arg. result = self._get_instance_nw_info(context, instance, networks, port_ids) + base_api.update_instance_cache_with_nw_info(self, context, instance, + result, update_cells=False) return result def _get_instance_nw_info(self, context, instance, networks=None,