Browse Source

Remove reduntant call to update_instance_info_cache

get_instance_nw_info calls _get_instance_nw_info,
which is decorated with @refresh_cache. This in
turn calls update_instance_info_cache, again. This
is both expensive and more importantly dangerous because
the method update_instance_info_cache may call
_get_instance_nw_info itself, thus causing an infinite
loop.

Change-Id: Id8f0241d1c6609cf4e064ee6855228ae7de250e2
Partial-bug: 1235435
(cherry picked from commit 651fac3d5d)
changes/21/73421/1
armando-migliaccio 8 years ago
committed by Aaron Rosen
parent
commit
b047eaa9d9
  1. 2
      nova/network/neutronv2/api.py

2
nova/network/neutronv2/api.py

@ -456,8 +456,6 @@ class API(base.Base):
and update cache.
"""
result = self._get_instance_nw_info(context, instance, networks)
update_instance_info_cache(self, context, instance, result,
update_cells=False)
return result
def _get_instance_nw_info(self, context, instance, networks=None):

Loading…
Cancel
Save