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)
This commit is contained in:
armando-migliaccio 2013-11-14 18:59:20 -08:00 committed by Aaron Rosen
parent bcdc813194
commit b047eaa9d9
1 changed files with 0 additions and 2 deletions

View File

@ -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):