Description of problem: In the case of OpenStack + OVN, when the VMs are booted on hypervisors supporting SR-IOV nics, there are no OVS ports for these VMs. When these VMs sends DHCPv4, DHPCv6 or IPv6 Router Solicitation requests, the local ovn-controller cannot reply to these packets. It is good if we can support this use case. Otherwise, Openstack neutron dhcp agent service needs to be deployed to use this feature. The logical ports of these VMs are not bound to any chassis as local ovn-controller don't see the ovs ports. OVN should support setting the type of these logical ports to "external". OVN can provide native services like DHCPv4/v6 etc. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
The patch to support this feature is submitted upstream - https://patchwork.ozlabs.org/patch/1025421/ The patch commit has more details about the RFE.
Hi Numan, To test this function on sriov environment,is it correct way to add the nic (we create vf ports on it) to the ovs bridge which has ovn-bridge-mappings setting for the local net port? I know that the vf has been attached to the vm,but I don't know how to connect it to ovn.
Hi Haidong Li, You don't have to connect to the OVN. What needs to be done is 1. Boot a VM and associate an sr-iov NIC to it. 2. Create a logical port in OVN NB DB and as usual associate mac-IP 3. Set the type of the logical port to external 4. Create an HA_Chasss_Group in OVN NB DB with one ha chassis or more as you prefer. 5. HA Chassis in this group should be connected to a same physical switch as the SR-IOC NIC is connected to. When the SR-IOV VM sends a DHCP request, the master ovn-controller (which claims this logical port) will reply the DHCP requests. Please take a look at this test case. You may get some idea. If you any doubts feel free to ask here or drop an email. https://github.com/openvswitch/ovs/blob/master/tests/ovn.at#L12537 The commit message here may give you more information - https://github.com/openvswitch/ovs/commit/96080083581275afaec8bc281d6a648aff7ef39e#diff-97d4cf929e4894ef95c4bfde3f896c34
Yes,I have to ask some questions about the case in github: 1. Is the vm with sriov NIC in one of the HA Chassis? 2. I saw the configuration in case of github,line 12599, I don't know what is the "hv1-ext1" port,is it a physical nic with sriov? https://github.com/openvswitch/ovs/blob/master/tests/ovn.at#L12599 ovs-vsctl -- add-port br-phys hv1-ext1 -- \ set interface hv1-ext1 options:tx_pcap=hv1/ext1-tx.pcap \ options:rxq_pcap=hv1/ext1-rx.pcap \ ofport-request=2
Many thanks Numan, I have read the case you provide and can understand the topo with your help. I know how to test it now and will add new test case to my environment soon.
verified on the latest version: [root@hp-dl385pg8-07 ovn_ha]# rpm -qa | grep openvswitch openvswitch2.11-2.11.0-9.el7fdp.x86_64 openvswitch-selinux-extra-policy-1.0-11.el7fdp.noarch kernel-kernel-networking-openvswitch-ovn_ha-1.0-34.noarch [root@hp-dl385pg8-07 ovn_ha]# rpm -qa | grep ovn ovn2.11-central-2.11.0-16.el7fdp.x86_64 ovn2.11-2.11.0-16.el7fdp.x86_64 ovn2.11-host-2.11.0-16.el7fdp.x86_64 kernel-kernel-networking-openvswitch-ovn_ha-1.0-34.noarch :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: TEST PROTOCOL :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: Package : kernel Installed : kernel-3.10.0-1040.el7.x86_64 beakerlib RPM : beakerlib-1.17-13.el7bkr.1.noarch bl-redhat RPM : beakerlib-redhat-1-32.el7bkr.noarch Test version : developer Test started : 2019-05-07 04:34:25 EDT Test finished : 2019-05-07 04:45:10 EDT (still running) Test duration : 645 seconds Test name : /kernel/networking/openvswitch/ovn_ha Distro : Red Hat Enterprise Linux Server release 7.7 Beta (Maipo) Hostname : hp-dl385pg8-07.rhts.eng.pek2.redhat.com Architecture : x86_64 CPUs : 24 x AMD Opteron(tm) Processor 6344 RAM size : 23895 MB HDD size : 267.46 GB :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Test description :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: PURPOSE of /kernel/networking/openvswitch/ovn_ha Description: OVN ha test Author: haidong li <haili> :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Setup :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Duration: 56s :: Assertions: 0 good, 0 bad :: RESULT: PASS :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: ovn_test_external :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ 04:45:10 ] :: [ PASS ] :: Command 'ovn_external' (Expected 0, got 0) :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Duration: 588s :: Assertions: 1 good, 0 bad :: RESULT: PASS :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: /kernel/networking/openvswitch/ovn_ha :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ 04:45:10 ] :: [ LOG ] :: JOURNAL XML: /var/tmp/beakerlib-qIcYPBd/journal.xml :: [ 04:45:10 ] :: [ LOG ] :: JOURNAL TXT: /var/tmp/beakerlib-qIcYPBd/journal.txt :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Duration: 645s :: Phases: 2 good, 0 bad :: OVERALL RESULT: PASS job link: https://beaker.engineering.redhat.com/recipes/6853666#task92603804
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2019:1385