Uploaded image for project: 'Fast Datapath Product'
  1. Fast Datapath Product
  2. FDP-1315

Live-migration with Trunk ports: Flows are installed on both primary and secondary chassis

    • False
    • Hide

      None

      Show
      None
    • False
    • Hide

      Given a VM with a trunk port and multiple subports running in a OpenStack environment using OVN for networking,

      When a live migration of the VM is initiated from the source host (hv1) to the destination host (hv2),

      Then, the OVN controller should ensure that the parent trunk port and subports are only bound to the destination host after migration, without flapping between source and destination during the process, and the flows are installed only on the primary/main chassis.

      Show
      Given a VM with a trunk port and multiple subports running in a OpenStack environment using OVN for networking, When a live migration of the VM is initiated from the source host (hv1) to the destination host (hv2), Then, the OVN controller should ensure that the parent trunk port and subports are only bound to the destination host after migration, without flapping between source and destination during the process, and the flows are installed only on the primary/main chassis.
    • rhel-9
    • None
    • rhel-net-ovn
    • Hide
      1. On Machine 1 (HV1)

       

      systemctl start openvswitch
      systemctl start ovn-northd
      ovn-nbctl set-connection ptcp:6641
      ovn-sbctl set-connection ptcp:6642
      ovs-vsctl set open . external_ids:system-id=hv1
      ovs-vsctl set open . external_ids:ovn-remote=tcp:42.42.42.1:6642
      ovs-vsctl set open . external_ids:ovn-encap-type=geneve
      ovs-vsctl set open . external_ids:ovn-encap-ip=42.42.42.1
      systemctl start ovn-controller
      ovs-vsctl add-br br-phys
      ovs-vsctl -- add-port br-int vif1 -- set Interface vif1 type=internal ofport-request=8
      ovn-nbctl ls-add lsw0
      ovs-vsctl set Interface vif1 external-ids:iface-id=lsp1
      ovn-nbctl lsp-add lsw0 lsp1
      ovn-nbctl lsp-add lsw0 sw0-port1.1 lsp1 7
      ovn-sbctl list Chassis
      # Record uuids
      uuid_hv1=$(ovn-sbctl --bare --columns _uuid find Chassis name=hv1 | sort)
      echo "uuid_hv1 = $uuid_hv1"
      uuid_hv2=$(ovn-sbctl --bare --columns _uuid find Chassis name=hv2 | sort)
      echo "uuid_hv2 = $uuid_hv2"
      ovn-nbctl list Logical_Switch_Port lsp1 | grep up |grep true
      ovn-nbctl list Logical_Switch_Port sw0-port1.1 | grep up |grep true
      # uuid should be same as recorded above for hv1
      uuid_lsp1=$(ovn-sbctl --bare --columns chassis find Port_Binding logical_port=lsp1)
      echo "uuid_lsp1 = $uuid_lsp1"
      uuid_sw0_port1=$(ovn-sbctl --bare --columns chassis find Port_Binding logical_port=sw0-port1.1)
      echo "uuid_sw0_port1 = $uuid_sw0_port1"
      ovn-sbctl --bare --columns chassis find Port_Binding logical_port=lsp1
      ovn-sbctl --bare --columns chassis find Port_Binding logical_port=sw0-port1.1
      # check that a flow installed on HV1
      ovs-ofctl dump-flows br-int table=0 |grep priority=150|grep dl_vlan=7| grep -c in_port=8
       
      

       

      1. Now configure the ovn and start ovn-controller on HV2

       

      1. On Machine 2 (HV2)

       

      systemctl start ovn-northd
      systemctl start openvswitch
      ovs-vsctl set open . external_ids:system-id=hv2
      ovs-vsctl set open . external_ids:ovn-remote=tcp:42.42.42.1:6642
      ovs-vsctl set open . external_ids:ovn-encap-type=geneve
      ovs-vsctl set open . external_ids:ovn-encap-ip=42.42.42.2
      systemctl start ovn-controller
      ovs-vsctl add-br br-phys
      ovs-vsctl -- add-port br-int vif1 -- set Interface vif1 type=internal ofport-request=8
      # check that no flow is installed on HV2
      ovs-ofctl dump-flows br-int table=0 |grep priority=150|grep dl_vlan=7| grep -c in_port=8
      ovs-vsctl set Interface vif1 external-ids:iface-id=lsp1
      ovn-nbctl --wait=hv sync
       
      

       

      1. On Machine 1 (HV1)

       

      # Add hv2 to lport Additional requested chassis as MAIN chassis
      # and confirm that no flows installed in table 0 on HV1
      ovn-nbctl set Logical_Switch_Port lsp1 options:requested-chassis=hv2,hv1
      ovn-nbctl --wait=hv sync
      ovn-nbctl --wait=sb sync
      ovn-nbctl list Logical_Switch_Port lsp1 |grep hv1 | grep hv2
      ovn-nbctl list Logical_Switch_Port lsp1
      # uuid should be same as recorded above for HV2
      ovn-sbctl --bare --columns chassis find Port_Binding logical_port=lsp1
      ovn-sbctl find Port_Binding logical_port=lsp1
      uuid_lsp1=$(ovn-sbctl --bare --columns chassis find Port_Binding logical_port=lsp1)
      # check that no flow is installed on HV1
      ovs-ofctl dump-flows br-int table=0 |grep priority=150|grep dl_vlan=7| grep -c in_port=8
       
      

       

      1. On Machine 2 (HV2)

       

      # check that flow is installed on HV2
      ovs-ofctl dump-flows br-int table=0 |grep priority=150|grep dl_vlan=7| grep -c in_port=8
       
      

      At least one flow is installed on both machines; however flow should be installed on the main chassis i.e. on HV2 and no flow should be present in HV1. 

      Show
      On Machine 1 (HV1)   systemctl start openvswitch systemctl start ovn-northd ovn-nbctl set-connection ptcp:6641 ovn-sbctl set-connection ptcp:6642 ovs-vsctl set open . external_ids:system-id=hv1 ovs-vsctl set open . external_ids:ovn-remote=tcp:42.42.42.1:6642 ovs-vsctl set open . external_ids:ovn-encap-type=geneve ovs-vsctl set open . external_ids:ovn-encap-ip=42.42.42.1 systemctl start ovn-controller ovs-vsctl add-br br-phys ovs-vsctl -- add-port br- int vif1 -- set Interface vif1 type=internal ofport-request=8 ovn-nbctl ls-add lsw0 ovs-vsctl set Interface vif1 external-ids:iface-id=lsp1 ovn-nbctl lsp-add lsw0 lsp1 ovn-nbctl lsp-add lsw0 sw0-port1.1 lsp1 7 ovn-sbctl list Chassis # Record uuids uuid_hv1=$(ovn-sbctl --bare --columns _uuid find Chassis name=hv1 | sort) echo "uuid_hv1 = $uuid_hv1" uuid_hv2=$(ovn-sbctl --bare --columns _uuid find Chassis name=hv2 | sort) echo "uuid_hv2 = $uuid_hv2" ovn-nbctl list Logical_Switch_Port lsp1 | grep up |grep true ovn-nbctl list Logical_Switch_Port sw0-port1.1 | grep up |grep true # uuid should be same as recorded above for hv1 uuid_lsp1=$(ovn-sbctl --bare --columns chassis find Port_Binding logical_port=lsp1) echo "uuid_lsp1 = $uuid_lsp1" uuid_sw0_port1=$(ovn-sbctl --bare --columns chassis find Port_Binding logical_port=sw0-port1.1) echo "uuid_sw0_port1 = $uuid_sw0_port1" ovn-sbctl --bare --columns chassis find Port_Binding logical_port=lsp1 ovn-sbctl --bare --columns chassis find Port_Binding logical_port=sw0-port1.1 # check that a flow installed on HV1 ovs-ofctl dump-flows br- int table=0 |grep priority=150|grep dl_vlan=7| grep -c in_port=8     Now configure the ovn and start ovn-controller on HV2   On Machine 2 (HV2)   systemctl start ovn-northd systemctl start openvswitch ovs-vsctl set open . external_ids:system-id=hv2 ovs-vsctl set open . external_ids:ovn-remote=tcp:42.42.42.1:6642 ovs-vsctl set open . external_ids:ovn-encap-type=geneve ovs-vsctl set open . external_ids:ovn-encap-ip=42.42.42.2 systemctl start ovn-controller ovs-vsctl add-br br-phys ovs-vsctl -- add-port br- int vif1 -- set Interface vif1 type=internal ofport-request=8 # check that no flow is installed on HV2 ovs-ofctl dump-flows br- int table=0 |grep priority=150|grep dl_vlan=7| grep -c in_port=8 ovs-vsctl set Interface vif1 external-ids:iface-id=lsp1 ovn-nbctl --wait=hv sync     On Machine 1 (HV1)   # Add hv2 to lport Additional requested chassis as MAIN chassis # and confirm that no flows installed in table 0 on HV1 ovn-nbctl set Logical_Switch_Port lsp1 options:requested-chassis=hv2,hv1 ovn-nbctl --wait=hv sync ovn-nbctl --wait=sb sync ovn-nbctl list Logical_Switch_Port lsp1 |grep hv1 | grep hv2 ovn-nbctl list Logical_Switch_Port lsp1 # uuid should be same as recorded above for HV2 ovn-sbctl --bare --columns chassis find Port_Binding logical_port=lsp1 ovn-sbctl find Port_Binding logical_port=lsp1 uuid_lsp1=$(ovn-sbctl --bare --columns chassis find Port_Binding logical_port=lsp1) # check that no flow is installed on HV1 ovs-ofctl dump-flows br- int table=0 |grep priority=150|grep dl_vlan=7| grep -c in_port=8     On Machine 2 (HV2)   # check that flow is installed on HV2 ovs-ofctl dump-flows br- int table=0 |grep priority=150|grep dl_vlan=7| grep -c in_port=8   At least one flow is installed on both machines; however flow should be installed on the main chassis i.e. on HV2 and no flow should be present in HV1. 
    • ssg_networking

      The issue was initially described and fixed in FDP-772, in which it prevents the installation of some flows in both the primary and secondary chassis. The fix worked fine until FDP 25.A builds, however, appeared again in 25.B (ovn24.09-24.09.2-26.el9fdp, ovn24.03-24.03.5-22.el9fdp, ovn22.12-22.12.1-109.el9fdp and ovn22.12-22.12.1-109.el8fdp). 

      The logs and databases from both chassis are attached as a reference. 

        1. hv2.zip
          247 kB
        2. hv1.zip
          17 kB

              ovnteam@redhat.com OVN Team
              rhn-support-eelahi Ehsan Elahi
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: