Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1498432

Summary: [OVN] VLAN aware VMs not working properly in OSP12 - neutron.tests.tempest.scenario.test_trunk.TrunkTest.test_trunk_subport_lifecycle
Product: Red Hat OpenStack Reporter: Daniel Alvarez Sanchez <dalvarez>
Component: openvswitchAssignee: Timothy Redaelli <tredaelli>
Status: CLOSED ERRATA QA Contact: Eran Kuris <ekuris>
Severity: high Docs Contact:
Priority: high    
Version: 12.0 (Pike)CC: amuller, apevec, chrisw, dalvarez, ekuris, fleitner, jlibosva, jschluet, majopela, mariel, nusiddiq, rhos-maint, sclewis, srevivo, tredaelli, tvignaud
Target Milestone: z1Keywords: TechPreview, Triaged, ZStream
Target Release: 12.0 (Pike)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openvswitch-2.7.3-2.git20171010.el7fdp Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-01-30 20:25:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1502742    
Bug Blocks: 1498035    
Attachments:
Description Flags
test results none

Description Daniel Alvarez Sanchez 2017-10-04 10:16:01 UTC
When running tempest tests against OSP12 with OVN, this test fails:
neutron.tests.tempest.scenario.test_trunk.TrunkTest.test_trunk_subport_lifecycle. Further details at [0].

The reason why it fails is that subports that don't reside in the same logical switch as the parent (and whenever those logical switches are not connected through a logical router), the subport won't get bound to the chassis when the parent does. This is because the port bindings of parent ports wasn't explicitly monitored by ovn-controller.

This patch [1] fixes the issue and has been backported recently to OVS 2.7 and also included in tag v2.7.3.

In order for this feature to work properly in OVN (Tech preview in OSP12) we would need openvswitch 2.7.3.


Steps to Reproduce:

- Create a logical switch net0
- Create a logical switch net1
- Add two logical ports to net0: port0 and port2
- Add another logical port to net1: port1
- Set the parent_name in Port_Binding table of both port1 and port2 to port0.
- Bind the port port0 to the chassis.

Actual results:

Chassis column is empty even though parent port is bound to the chassis:

_uuid               : 77cac6d9-1a6e-495b-a59b-dae2c495cae3
chassis             : []
datapath            : baf94869-7b80-49ad-b358-3718af68310a
logical_port        : "port1"
mac                 : ["02:ac:10:ff:01:01 60.0.0.11"]
options             : {}
parent_port         : "port0"


_uuid               : 6a625dfc-c106-4fca-8210-4fb04e6746ec
chassis             : 205641db-2d41-408e-b986-1d7757604e0f
datapath            : 7f41aee1-13f5-45db-8eb8-30176b70dbcf
external_ids        : {}
gateway_chassis     : []
logical_port        : "port0"
mac                 : ["02:ac:10:ff:01:00 50.0.0.10"]
nat_addresses       : []
options             : {}
parent_port         : []


Expected results:

The chassis column is not empty:

_uuid               : 77cac6d9-1a6e-495b-a59b-dae2c495cae3
chassis             : 205641db-2d41-408e-b986-1d7757604e0f
datapath            : baf94869-7b80-49ad-b358-3718af68310a
logical_port        : "port1"
mac                 : ["02:ac:10:ff:01:01 60.0.0.11"]
options             : {}
parent_port         : "port0"



[0] https://bugzilla.redhat.com/show_bug.cgi?id=1498035
[1] https://github.com/openvswitch/ovs/commit/afaf4de07083863bccb1feaf01f37a59ca06a909

Comment 1 Flavio Leitner 2017-10-04 21:27:08 UTC
This is queued for the next update in March/2018 for fast-datapath.
If you need earlier, please state when and the business justification.
Thanks,
fbl

Comment 2 Daniel Alvarez Sanchez 2017-10-05 08:44:51 UTC
Hi Flavio, OVN is in tech preview for OSP12 and this showed up during the OSP12 validation tests, not from a customer request.

Would it be easier to have this patch [0] applied on top of current downstream version instead? As we want customers to move to OVN from OSP13 on, I think that it'd be great that this kind of bugs would be fixed whenever possible (especially as the fix is simple like this).


Thanks a lot!
Daniel

[0] https://github.com/openvswitch/ovs/commit/afaf4de07083863bccb1feaf01f37a59ca06a909

Comment 3 Numan Siddique 2017-10-07 18:19:34 UTC
Please note that OVS 2.7.3 has an important fix [1] which significantly reduces the ovn-controller's CPU usage. This patch doesn't install the OF flows which are not required. More details in the commit message of the patch [1]

[1] - https://github.com/openvswitch/ovs/commit/6b5df63d9699efbee4701570f699ef043a3cff81

Having OVS 2.7.3 in OSP12 for OVN deployments would be really useful.

Comment 10 Eran Kuris 2018-01-28 14:44:33 UTC
I ran neutron_tempest_plugin.scenario.test_trunk.TrunkTest.test_subport_connectivity
and it failed(attached log). During debugging I found few things:
1. VM doesnt get IP address to sub-port interface 
 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1442 qdisc pfifo_fast state UP 
 qlen 1000
    link/ether fa:16:3e:99:e7:4b brd ff:ff:ff:ff:ff:ff
    inet 10.100.0.6/28 brd 10.100.0.15 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::f816:3eff:fe99:e74b/64 scope link 
       valid_lft forever preferred_lft forever
 3: eth0.10@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1442 qdisc noqueue state 
 UP qlen 1000
    link/ether fa:16:3e:99:e7:4b brd ff:ff:ff:ff:ff:ff
    inet6 fe80::f816:3eff:fe99:e74b/64 scope link 
       valid_lft forever preferred_lft forever

2. there is no "br-trunk" which suppose to be connected to br-int so data with tag can be passed to the VM subinterface(this is how it work in ML2/ovs).


Adding Mojo for reference.
 https://mojo.redhat.com/docs/DOC-1088196-vlan-aware-vms

Comment 11 Eran Kuris 2018-01-28 14:45:21 UTC
Created attachment 1387222 [details]
test results

Comment 12 Daniel Alvarez Sanchez 2018-01-29 08:48:39 UTC
(In reply to Eran Kuris from comment #10)
> I ran
> neutron_tempest_plugin.scenario.test_trunk.TrunkTest.
> test_subport_connectivity
> and it failed(attached log). During debugging I found few things:
> 1. VM doesnt get IP address to sub-port interface 
>  1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
>     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
>     inet 127.0.0.1/8 scope host lo
>        valid_lft forever preferred_lft forever
>     inet6 ::1/128 scope host 
>        valid_lft forever preferred_lft forever
>  2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1442 qdisc pfifo_fast state
> UP 
>  qlen 1000
>     link/ether fa:16:3e:99:e7:4b brd ff:ff:ff:ff:ff:ff
>     inet 10.100.0.6/28 brd 10.100.0.15 scope global eth0
>        valid_lft forever preferred_lft forever
>     inet6 fe80::f816:3eff:fe99:e74b/64 scope link 
>        valid_lft forever preferred_lft forever
>  3: eth0.10@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1442 qdisc noqueue
> state 
>  UP qlen 1000
>     link/ether fa:16:3e:99:e7:4b brd ff:ff:ff:ff:ff:ff
>     inet6 fe80::f816:3eff:fe99:e74b/64 scope link 
>        valid_lft forever preferred_lft forever
> 
> 2. there is no "br-trunk" which suppose to be connected to br-int so data
> with tag can be passed to the VM subinterface(this is how it work in
> ML2/ovs).
> 
> 
> Adding Mojo for reference.
>  https://mojo.redhat.com/docs/DOC-1088196-vlan-aware-vms

Let's look into this.
BTW, in case of OVN there's no br-trunk and the tag/untag happens directly in br-int with OpenFlow rules.

Comment 13 Daniel Alvarez Sanchez 2018-01-29 11:23:31 UTC
When I originally opened this bug, it was because neutron.tests.tempest.scenario.test_trunk.TrunkTest.test_trunk_subport_lifecycle wasn't passing. This was due to the fact that there was a bug in core OVN where parent port was not properly set. This bug was fixed in openvswitch-2.7.3-2.git20171010.el7fdp and I could verify that the test passes with it. From our IRC conversation it looks like it also passed for you.

I'd agree that the title of this BZ is a bit too generic but the test you're seeing failing now it's a different one and it has a different root cause. Shall we rename this BZ and open a different one for this other issue?

Comment 14 Eran Kuris 2018-01-29 11:36:29 UTC
according to Ofer .B. & Daniel I am setting this BZ as Verified.
Test "test_trunk_subport_lifecycle" passed on: 
cat /etc/yum.repos.d/latest-installed 
12   -p 2018-01-26.2
pm -qa |grep openvswitch-2.7.
openvswitch-2.7.3-3.git20180112.el7fdp.x86_64
python-openvswitch-2.7.3-3.git20180112.el7fdp.noarch


New BZ will be open about test_trunk.TrunkTest.test_subport_connectivity failure.

Comment 15 Eran Kuris 2018-01-29 11:53:29 UTC
^
Adding the new BZ ID: https://bugzilla.redhat.com/show_bug.cgi?id=1539652

Comment 20 errata-xmlrpc 2018-01-30 20:25:08 UTC
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-2018:0248