ovn: Disable activation-strategy=rarp for DPDK ports

When vhosuser* is used, qemu won't send RARP; instead, it will request
guest's virtio to announce the guest. Which ultimately generates GARP
(for IPv4) and NA (for IPv6) addresses.

This results in port not being activated until it's too late (only when
nova updates neutron via api).

It's better to have activation-strategy disabled until ovn-controller
learns how to activate with GARPs and NAs.

Related-Bug: #2092407
Change-Id: I71e6ec0d87adec629262c5a488bc9739f78ad6f8
This commit is contained in:
Ihar Hrachyshka 2024-12-23 10:28:24 -05:00
parent 0c29e730db
commit e16ab24cd8
3 changed files with 37 additions and 2 deletions

View File

@ -501,7 +501,11 @@ class OVNClient:
# Block traffic on destination host until libvirt sends
# a RARP packet from it to inform network about the new
# location of the port
options['activation-strategy'] = 'rarp'
# TODO(ihrachys) Remove this once OVN properly supports
# activation of DPDK ports (bug 2092407)
if (port[portbindings.VIF_TYPE] !=
portbindings.VIF_TYPE_VHOST_USER):
options['activation-strategy'] = 'rarp'
# Virtual ports can not be bound by using the requested-chassis
# mechanism, ovn-controller will create the Port_Binding entry

View File

@ -2069,7 +2069,8 @@ class TestOVNMechanismDriver(TestOVNMechanismDriverBase):
portbindings.HOST_ID: 'fake-src',
portbindings.PROFILE: {
ovn_const.MIGRATING_ATTR: 'fake-dest',
}
},
portbindings.VIF_TYPE: portbindings.VIF_TYPE_OVS,
}
with mock.patch.object(
self.mech_driver._ovn_client._sb_idl, 'is_col_present',
@ -2079,6 +2080,27 @@ class TestOVNMechanismDriver(TestOVNMechanismDriverBase):
self.assertEqual('fake-src,fake-dest',
options.options['requested-chassis'])
def test__get_port_options_migrating_vhostuser(self):
port = {
'id': 'virt-port',
'mac_address': '00:00:00:00:00:00',
'device_owner': 'device_owner',
'network_id': 'foo',
'fixed_ips': [],
portbindings.HOST_ID: 'fake-src',
portbindings.PROFILE: {
ovn_const.MIGRATING_ATTR: 'fake-dest',
},
portbindings.VIF_TYPE: portbindings.VIF_TYPE_VHOST_USER,
}
with mock.patch.object(
self.mech_driver._ovn_client._sb_idl, 'is_col_present',
return_value=True):
options = self.mech_driver._ovn_client._get_port_options(port)
self.assertNotIn('activation-strategy', options.options)
self.assertEqual('fake-src,fake-dest',
options.options['requested-chassis'])
def test__get_port_options_not_migrating_additional_chassis_present(self):
port = {
'id': 'virt-port',

View File

@ -0,0 +1,9 @@
---
fixes:
- |
For OVN DPDK ports, live migration activation strategy that expects a RARP
frame sent by QEMU is no longer used. This is because for DPDK ports, QEMU
does not send a RARP frame, which affects the time to recover network
connectivity for DPDK ports after live migration is complete. Note that
because of the change, some low number of duplicate packets from these
ports may be observed during live migration.