-
Bug
-
Resolution: Unresolved
-
Undefined
-
None
-
None
-
None
-
1
-
False
-
-
False
-
?
-
openstack-neutron-22.2.2-18.0.20251217114731.51e19bb.el9osttrunk
-
rhos-connectivity-neutron
-
None
-
-
-
-
Neutron Gluon 2
-
1
-
Moderate
When live migrating an instance, the resulting neutron:host_id set in the external_ids of an LSP in OVN can be the wrong one.
The root cause seems to be related to this logic which always uses the host of the 1st port_bindings found in the db_port:
https://github.com/openstack/neutron/blob/27.0.1/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py#L327
I added logging and performed 2 live migrations to confirm the behavior.
In both cases, neutron:host_id is set to os-compute1 after live migration completion.
I expect the value to be set to the destination host.
When live migrating from os-compute2 to os-compute1:
port_bindings=[
<neutron.plugins.ml2.models.PortBinding[object at 7d03e3e7f080] {
port_id='37ce61b7-cbb0-4256-a9e7-d4e0d139f984',
host='os-compute1',
vnic_type='normal',
profile='{"os_vif_delegation": true}',
vif_type='ovs',
vif_details='{"port_filter": true, "connectivity": "l2", "bridge_name": "br-int", "datapath_type": "system"}',
status='ACTIVE'
}>,
<neutron.plugins.ml2.models.PortBinding[object at 7d03e3e7ef60] {
port_id='37ce61b7-cbb0-4256-a9e7-d4e0d139f984',
host='os-compute2',
vnic_type='normal',
profile='{"os_vif_delegation": true, "migrating_to": "os-compute1"}',
vif_type='unbound',
vif_details='',
status='INACTIVE'
}>
]
When migrating from os-compute1 to os-compute2:
port_bindings=[
<neutron.plugins.ml2.models.PortBinding[object at 7d03e428da60] {
port_id='37ce61b7-cbb0-4256-a9e7-d4e0d139f984',
host='os-compute1',
vnic_type='normal',
profile='{"os_vif_delegation": true, "migrating_to": "os-compute2"}',
vif_type='unbound',
vif_details='',
status='INACTIVE'
}>,
<neutron.plugins.ml2.models.PortBinding[object at 7d03e34e93a0] {
port_id='37ce61b7-cbb0-4256-a9e7-d4e0d139f984',
host='os-compute2',
vnic_type='normal',
profile='{"os_vif_delegation": true}',
vif_type='ovs',
vif_details='{"port_filter": true, "connectivity": "l2", "bridge_name": "br-int", "datapath_type": "system"}',
status='ACTIVE'
}>
]