Don't set binding:host_id before port binding
This is because the neutron DVR scheduler expects both
'binding:host_id' and 'device_owner' to be changed as an indicator
to send notification to agent to create the qrouters namespace.
Right now, kuryr changes 'binding:host_id' and 'device_owner' in
separated API requests, which confuses the DVR scheduler and
cause the missing of the notification.
Change-Id: Ifb22cc50f284dfd46eb7ba1999cd9c2c0b25a2c6
Closes-Bug: #1802163
(cherry picked from commit 7a1e1a4034
)
This commit is contained in:
parent
6d21d8a9d6
commit
7d24d83a2a
|
@ -511,7 +511,6 @@ def _update_existing_port(existing_port, fixed_ip, mac_address):
|
|||
updated_port = {
|
||||
'name': const.NEUTRON_UNBOUND_PORT,
|
||||
'admin_state_up': True,
|
||||
'binding:host_id': lib_utils.get_hostname(),
|
||||
}
|
||||
if mac_address:
|
||||
updated_port['mac_address'] = mac_address
|
||||
|
|
|
@ -879,7 +879,6 @@ class TestKuryrIpam(base.TestKuryrBase):
|
|||
update_port = {
|
||||
'name': const.NEUTRON_UNBOUND_PORT,
|
||||
'admin_state_up': True,
|
||||
'binding:host_id': lib_utils.get_hostname(),
|
||||
'mac_address': requested_mac_address,
|
||||
}
|
||||
mock_update_port.return_value = fake_port
|
||||
|
@ -995,7 +994,6 @@ class TestKuryrIpam(base.TestKuryrBase):
|
|||
update_port = {
|
||||
'name': const.NEUTRON_UNBOUND_PORT,
|
||||
'admin_state_up': True,
|
||||
'binding:host_id': lib_utils.get_hostname(),
|
||||
'mac_address': requested_mac_address,
|
||||
}
|
||||
mock_update_port.return_value = fake_port
|
||||
|
|
Loading…
Reference in New Issue