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
This commit is contained in:
Hongbin Lu 2018-12-09 00:45:29 +00:00
parent 4788815d4a
commit 7a1e1a4034
2 changed files with 0 additions and 3 deletions

View File

@ -524,7 +524,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

View File

@ -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