[FT] FdbInterfaceTestCase test cases failing when creating two VTI with the same VNI

Bug #1845354 reported by Rodolfo Alonso
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Undecided
Rodolfo Alonso

Bug Description

In "FdbInterfaceTestCase" test cases (no namespace scenario), can happen that two test cases are creating VXLAN interfaces in the kernel namespace (VTI) in the same VTEP and the same destination port (default=4789). In this case, the kernel will raise the exception errno.EEXIST (file already exists).

In order to avoid this problem, a random VNI could be used when creating the VXLAN interfaces.

LOGS:
[1]https://9722deaa313ebebb56dc-c08b881decb3106ff13d720dd4a26025.ssl.cf5.rackcdn.com/681846/5/check/neutron-functional-python27/c3dc48a/testr_results.html.gz

HOW TO TEST IT:
from neutron.agent.linux import ip_lib
from neutron.privileged.agent.linux import ip_lib as priv_ip_lib
ns_name = 'ns_test'
try:
    priv_ip_lib.remove_netns(ns_name)
except:
    pass
priv_ip_lib.create_netns(ns_name)
dev = 'device'
dev2 = 'device2'
dev_vxlan = 'device_vxlan'
dev_vxlan2 = 'device_vxlan2'
ip_wrapper = ip_lib.IPWrapper(ns_name)
ip_wrapper.add_dummy(dev)
ip_wrapper.add_dummy(dev2)
ip_device1 = ip_lib.IPDevice(dev, ns_name)
ip_device2 = ip_lib.IPDevice(dev2, ns_name)
ip_device1.link.set_up()
ip_device2.link.set_up()
ip_wrapper.add_vxlan(dev_vxlan, 100, dev=dev)
try:
    ip_wrapper.add_vxlan(dev_vxlan2, 100, dev=dev2)
except Exception as e:
    print(str(e))
priv_ip_lib.remove_netns(ns_name)

Changed in neutron:
assignee: nobody → Rodolfo Alonso (rodolfo-alonso-hernandez)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.opendev.org/684805

Changed in neutron:
status: New → In Progress
Revision history for this message
Rodolfo Alonso (rodolfo-alonso-hernandez) wrote :

NOTE: this code is NOT present in stable/stein. No backport is needed.

description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.opendev.org/684805
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=761b91fd221914ce06ded381264740abc29fe066
Submitter: Zuul
Branch: master

commit 761b91fd221914ce06ded381264740abc29fe066
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Wed Sep 25 16:23:31 2019 +0000

    Randomize VNI in FdbInterfaceTestCase

    Randomize VNI in FdbInterfaceTestCase to avoid clashes if several test
    cases are creating VXLAN interfaces in the kernel namespace at the
    same time.

    Change-Id: Ic90fa31aa15723eab7f518a42762a7f1c80ee736
    Closes-Bug: #1845354

Changed in neutron:
status: In Progress → Fix Released
tags: added: neutron-proactive-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/train)

Fix proposed to branch: stable/train
Review: https://review.opendev.org/688153

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/train)

Reviewed: https://review.opendev.org/688153
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=54c8943ab5a6b980212d9c4c94173dc6b41dc78d
Submitter: Zuul
Branch: stable/train

commit 54c8943ab5a6b980212d9c4c94173dc6b41dc78d
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Wed Sep 25 16:23:31 2019 +0000

    Randomize VNI in FdbInterfaceTestCase

    Randomize VNI in FdbInterfaceTestCase to avoid clashes if several test
    cases are creating VXLAN interfaces in the kernel namespace at the
    same time.

    Change-Id: Ic90fa31aa15723eab7f518a42762a7f1c80ee736
    Closes-Bug: #1845354
    (cherry picked from commit 761b91fd221914ce06ded381264740abc29fe066)

tags: added: in-stable-train
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 15.0.1

This issue was fixed in the openstack/neutron 15.0.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 16.0.0.0b1

This issue was fixed in the openstack/neutron 16.0.0.0b1 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.