From 8e5adb231f6bcdead8fd2b034de683b95bf01c58 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Tue, 14 Jan 2020 14:13:34 +0000 Subject: [PATCH] nova-net: Remove now unnecessary nova-net workaround We removed the comment for this workaround in change Ifa9c5c468400261a5e1f66b72c575845173a4f8f but failed to remove the workaround itself. Resolve this now. Change-Id: I0a5b17f5b38ae3c2877fd8ea496047f8e56f3358 Signed-off-by: Stephen Finucane --- nova/compute/api.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/nova/compute/api.py b/nova/compute/api.py index d682933a9d..3eb0a45075 100644 --- a/nova/compute/api.py +++ b/nova/compute/api.py @@ -64,7 +64,6 @@ from nova.network import model as network_model from nova.network import neutron from nova.network import security_group_api from nova import objects -from nova.objects import base as obj_base from nova.objects import block_device as block_device_obj from nova.objects import external_event as external_event_obj from nova.objects import fields as fields_obj @@ -2388,17 +2387,7 @@ class API(base.Base): delete_type if delete_type != 'soft_delete' else 'delete'): elevated = context.elevated() - orig_host = instance.host - try: - if instance.vm_state == vm_states.SHELVED_OFFLOADED: - sysmeta = getattr(instance, - obj_base.get_attrname( - 'system_metadata')) - instance.host = sysmeta.get('shelved_host') - self.network_api.deallocate_for_instance(elevated, - instance) - finally: - instance.host = orig_host + self.network_api.deallocate_for_instance(elevated, instance) # cleanup volumes self._local_cleanup_bdm_volumes(bdms, instance, context)