From b047eaa9d96dc7c8f7a2f4311277090ce9d21d89 Mon Sep 17 00:00:00 2001 From: armando-migliaccio Date: Thu, 14 Nov 2013 18:59:20 -0800 Subject: [PATCH] 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 651fac3d5d250d42e640c3ac113084bf0d2fa3b4) --- nova/network/neutronv2/api.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/nova/network/neutronv2/api.py b/nova/network/neutronv2/api.py index 86cf45bbfb0e..61476ae02c90 100644 --- a/nova/network/neutronv2/api.py +++ b/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):