Not set fip to ERROR if it exists on device
The centralized floating IP can exist on the router device due to some reasons like: uncleaned fip addr, and especially multiple IP addr adding action: HA router _add_vip() and Edge router add_ip_address(). This patch catches the IpAddressAlreadyExists error if fip was already set on the device, and still process next step. Change-Id: I324f6b96baa0520a0f7ef62a83d81864d7b27999 Closes-Bug: #1811213
This commit is contained in:
parent
ee19fa49b7
commit
4d45699f15
|
@ -317,6 +317,8 @@ class DvrEdgeRouter(dvr_local_router.DvrLocalRouter):
|
|||
try:
|
||||
ip_lib.add_ip_address(fip_cidr, interface_name,
|
||||
namespace=self.snat_namespace.name)
|
||||
except ip_lib.IpAddressAlreadyExists:
|
||||
pass
|
||||
except RuntimeError:
|
||||
LOG.warning("Unable to configure IP address for centralized "
|
||||
"floating IP: %s", fip['id'])
|
||||
|
|
|
@ -829,6 +829,7 @@ def get_device_mtu(device_name, namespace=None):
|
|||
|
||||
NetworkNamespaceNotFound = privileged.NetworkNamespaceNotFound
|
||||
NetworkInterfaceNotFound = privileged.NetworkInterfaceNotFound
|
||||
IpAddressAlreadyExists = privileged.IpAddressAlreadyExists
|
||||
|
||||
|
||||
def add_ip_address(cidr, device, namespace=None, scope='global',
|
||||
|
|
Loading…
Reference in New Issue