Ensure we don't pass empty addresses to lsp_set_addresses
If we somehow have an empty set of addresses, lsp_set_addresses will fail. This instead calls db_clear() on the addresses field if we are trying to set it to empty. Closes-bug: #1860560 Change-Id: Ied92eb85b74e63a7317d50970b5131fb49e3e4b0
This commit is contained in:
parent
e15d1003f8
commit
c6a5b284b5
|
@ -435,8 +435,13 @@ class DBInconsistenciesPeriodics(object):
|
|||
elif not type_ and ovn_const.UNKNOWN_ADDR in addresses:
|
||||
addresses.remove(ovn_const.UNKNOWN_ADDR)
|
||||
|
||||
self._nb_idl.lsp_set_addresses(
|
||||
port.name, addresses=addresses).execute(check_error=True)
|
||||
if addresses:
|
||||
self._nb_idl.lsp_set_addresses(
|
||||
port.name, addresses=addresses).execute(check_error=True)
|
||||
else:
|
||||
self._nb_idl.db_clear(
|
||||
'Logical_Switch_Port', port.name,
|
||||
'addresses').execute(check_error=True)
|
||||
|
||||
raise periodics.NeverAgain()
|
||||
|
||||
|
|
Loading…
Reference in New Issue