Browse Source

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
Hongbin Lu 4 months ago
parent
commit
7a1e1a4034
2 changed files with 0 additions and 3 deletions
  1. 0
    1
      kuryr_libnetwork/controllers.py
  2. 0
    2
      kuryr_libnetwork/tests/unit/test_kuryr_ipam.py

+ 0
- 1
kuryr_libnetwork/controllers.py View File

@@ -524,7 +524,6 @@ def _update_existing_port(existing_port, fixed_ip, mac_address):
524 524
         updated_port = {
525 525
             'name': const.NEUTRON_UNBOUND_PORT,
526 526
             'admin_state_up': True,
527
-            'binding:host_id': lib_utils.get_hostname(),
528 527
         }
529 528
         if mac_address:
530 529
             updated_port['mac_address'] = mac_address

+ 0
- 2
kuryr_libnetwork/tests/unit/test_kuryr_ipam.py View File

@@ -879,7 +879,6 @@ class TestKuryrIpam(base.TestKuryrBase):
879 879
         update_port = {
880 880
             'name': const.NEUTRON_UNBOUND_PORT,
881 881
             'admin_state_up': True,
882
-            'binding:host_id': lib_utils.get_hostname(),
883 882
             'mac_address': requested_mac_address,
884 883
         }
885 884
         mock_update_port.return_value = fake_port
@@ -995,7 +994,6 @@ class TestKuryrIpam(base.TestKuryrBase):
995 994
         update_port = {
996 995
             'name': const.NEUTRON_UNBOUND_PORT,
997 996
             'admin_state_up': True,
998
-            'binding:host_id': lib_utils.get_hostname(),
999 997
             'mac_address': requested_mac_address,
1000 998
         }
1001 999
         mock_update_port.return_value = fake_port

Loading…
Cancel
Save