[OVN]Ensure gateway port is running after gateway chassis changed
During normal operation of a router, its gateway port state is running. When the gateway chassis of the router binding changes, the host bound to the gateway port will be updated(call core_plugin.update_port). at this time, the status of the router gateway port will become down, and we need to update it to active(call core_plugin.update_port_status). Closes-bug: #1958353 Change-Id: I4c10904d716abb4482898c08f9fd72ad5b106906
This commit is contained in:
parent
a9730576b1
commit
6636f65663
|
@ -345,7 +345,7 @@ class OVNL3RouterPlugin(service_base.ServicePluginBase,
|
|||
# device owner is router_gateway. We need to look into it and
|
||||
# fix the problem in Neutron before updating it here.
|
||||
if host:
|
||||
self._plugin.update_port(
|
||||
port = self._plugin.update_port(
|
||||
context, port['id'],
|
||||
{'port': {portbindings.HOST_ID: host}})
|
||||
|
||||
|
|
|
@ -1445,6 +1445,10 @@ class TestOVNL3RouterPlugin(test_mech_driver.Ml2PluginV2TestCase):
|
|||
mock_get_port.return_value = [{
|
||||
'id': fake_port_id,
|
||||
'status': constants.PORT_STATUS_DOWN}]
|
||||
mock_updt_port.return_value = {
|
||||
'id': fake_port_id,
|
||||
'status': constants.PORT_STATUS_DOWN
|
||||
}
|
||||
self.l3_inst.update_router_gateway_port_bindings(
|
||||
fake_router, fake_host)
|
||||
|
||||
|
|
Loading…
Reference in New Issue