Uploaded image for project: 'Red Hat OpenStack Services on OpenShift'
  1. Red Hat OpenStack Services on OpenShift
  2. OSPRH-23752

Wrong neutron:host_id in LSP external_ids after live migration

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • None
    • openstack-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'
            }>
          ]

       

      U/S bug: https://bugs.launchpad.net/neutron/+bug/2134504

              rodolfo_alonso Rodolfo Alonso
              rodolfo_alonso Rodolfo Alonso
              rhos-dfg-networking-squad-neutron
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: