From 15442adb01d52f51299063641677cba43768a8db Mon Sep 17 00:00:00 2001 From: Yun Mao Date: Tue, 26 Jun 2012 17:27:04 -0400 Subject: Ignore floatingIpNotAssociated during disassociation. This helps in corner cases where the exception prevents network deallocation. Change-Id: I88849899c5a2ed69696b644cb5f856fca5f40da7 --- nova/network/manager.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/nova/network/manager.py b/nova/network/manager.py index fb37499e4..d73013b81 100644 --- a/nova/network/manager.py +++ b/nova/network/manager.py @@ -370,8 +370,12 @@ class FloatingIP(object): # disassociate floating ips related to fixed_ip for floating_ip in floating_ips: address = floating_ip['address'] - self.disassociate_floating_ip(read_deleted_context, address, - affect_auto_assigned=True) + try: + self.disassociate_floating_ip(read_deleted_context, + address, + affect_auto_assigned=True) + except exception.FloatingIpNotAssociated: + LOG.exception(_("Floating IP is not associated. Ignore.")) # deallocate if auto_assigned if floating_ip['auto_assigned']: self.deallocate_floating_ip(read_deleted_context, address, -- cgit