Bug 1539652 - [OVN] TrunkTest.test_subport_connectivity - failed
Summary: [OVN] TrunkTest.test_subport_connectivity - failed
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-networking-ovn
Version: 12.0 (Pike)
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: z2
: 12.0 (Pike)
Assignee: Daniel Alvarez Sanchez
QA Contact: Eran Kuris
URL:
Whiteboard:
Depends On:
Blocks: 1550039
TreeView+ depends on / blocked
 
Reported: 2018-01-29 11:50 UTC by Eran Kuris
Modified: 2019-09-09 16:36 UTC (History)
7 users (show)

Fixed In Version: python-networking-ovn-3.0.0-4.el7ost
Doc Type: Bug Fix
Doc Text:
Cause: When a subnet is created without a gateway, no DHCP options were added. Consequence: Instances on such subnets are not able to obtain DHCP. Fix: Metadata/DHCP port is used instead for this purpose so that instances can obtain an IP address. Only requirement so far is that metadata service is enabled. Result: Instances on subnets without a external gateway are now able to obtain their IP addresses through DHCP via the OVN metadata/DHCP port.
Clone Of:
: 1550039 (view as bug list)
Environment:
Last Closed: 2018-03-06 07:40:47 UTC
Target Upstream Version:


Attachments (Terms of Use)
test results (100.04 KB, text/html)
2018-01-29 11:50 UTC, Eran Kuris
no flags Details


Links
System ID Priority Status Summary Last Updated
Launchpad 1670666 None None None 2018-01-30 13:11:37 UTC
OpenStack gerrit 534741 None MERGED Use metadata IP as DHCP service IP for subnet without gateway IP 2020-04-06 11:53:44 UTC
OpenStack gerrit 539901 None MERGED Use metadata IP as DHCP service IP for subnet without gateway IP 2020-04-06 11:53:43 UTC

Description Eran Kuris 2018-01-29 11:50:23 UTC
Created attachment 1387699 [details]
test results

Description of problem:
neutron_tempest_plugin.scenario.test_trunk.TrunkTest.test_subport_connectivity
failed(attached log). During debugging I found that vm booted with subport but it does not  get IP address after running dhclient:
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

Version-Release number of selected component (if applicable):
$ cat /etc/yum.repos.d/latest-installed 
12   -p 2018-01-26.2
[root@controller-1 ~]# rpm -qa |grep ovn
openstack-nova-novncproxy-16.0.2-9.el7ost.noarch
openvswitch-ovn-common-2.7.3-3.git20180112.el7fdp.x86_64
novnc-0.6.1-1.el7ost.noarch
openvswitch-ovn-central-2.7.3-3.git20180112.el7fdp.x86_64
puppet-ovn-11.3.0-1.el7ost.noarch
openvswitch-ovn-host-2.7.3-3.git20180112.el7fdp.x86_64
python-networking-ovn-3.0.0-3.el7ost.noarch
[root@controller-1 ~]# rpm -qa |grep openvswitch-2.7.
python-openvswitch-2.7.3-3.git20180112.el7fdp.noarch
openvswitch-2.7.3-3.git20180112.el7fdp.x86_64


How reproducible:
always

Steps to Reproduce:
1.Deploy OVN-HA trunk enabled - 
custom_templates:
       parameter_defaults:
               NeutronServicePlugins: ovn-router,trunk
2.Run neutron_tempest_plugin.scenario.test_trunk.TrunkTest.test_subport_connectivity
3.

Actual results:
the test failed, subport interface does not get IP address and connectivity test failed

Expected results:
The test should be pass 

Additional info:

Comment 1 Daniel Alvarez Sanchez 2018-01-30 13:11:37 UTC
Indeed, the subport is not getting the IP address through DHCP.
After some debugging, it looks like when the subnet doesn't have a gateway set, the DHCP options don't get configured [0] and ovn-northd will skip setting the lflows [1] for the DHCP offer.

The solution would be to set the server IP in DHCP to the metadata port IP address. This way, DHCP will work. There's already a patch for this [2] under review and when it merges, I'll do the backport into pike.

Also, we'll need to add these temepest plugin tests to networking-ovn upstream gate.


[0] https://review.openstack.org/#/c/534741/
[1] https://github.com/openvswitch/ovs/blob/master/ovn/northd/ovn-northd.c#L2694
[2] https://review.openstack.org/#/c/534741/

Comment 2 Daniel Alvarez Sanchez 2018-01-30 13:14:27 UTC
(In reply to Daniel Alvarez Sanchez from comment #1)
> Indeed, the subport is not getting the IP address through DHCP.
> After some debugging, it looks like when the subnet doesn't have a gateway
> set, the DHCP options don't get configured [0]

Sorry, [0] should've been this link:

[0] https://github.com/openstack/networking-ovn/blob/master/networking_ovn/common/ovn_client.py#L1164


Note You need to log in before you can comment on or make changes to this bug.