Bug 1780620 - [OSP13][tempest] smoke test fails when the external network has multiple IPv4 subnet
Summary: [OSP13][tempest] smoke test fails when the external network has multiple IPv4...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tempest
Version: 13.0 (Queens)
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Lukas Piwowarski
QA Contact: Martin Kopec
URL:
Whiteboard:
: 1780619 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-12-06 14:36 UTC by Mauro Oddi
Modified: 2023-12-15 17:07 UTC (History)
6 users (show)

Fixed In Version: openstack-tempest-18.0.0-14.el7ost
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-06-24 11:41:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1856671 0 None None None 2019-12-17 09:30:30 UTC
OpenStack gerrit 705215 0 None MERGED Add subnet_id option 2020-11-18 16:13:40 UTC
Red Hat Issue Tracker OSP-30803 0 None None None 2023-12-15 17:07:12 UTC

Description Mauro Oddi 2019-12-06 14:36:49 UTC
Description of problem:
Tempest smoke test expects that the external network has only on IPv4 subnet, however in some corner cases there is a

Version-Release number of selected component (if applicable):
RHOSP13z9

How reproducible:
always

Steps to Reproduce:
1. Create external network for tempest and two IPv4 subnets on it
2. Run tempest run --smoke


Actual results:
test fails

Expected results:
tests finihses

Additional info:

tempest.scenario.test_network_basic_ops.TestNetworkBasicOps.test_network_basic_ops[compute,id-f323b3ba-82f8-4db7-8ea6-6a895869ec49,netw
ork,smoke]
---------------------------------------------------------------------------------------------------------------------------------------
----------

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):
      File "/usr/lib/python2.7/site-packages/tempest/common/utils/__init__.py", line 88, in wrapper
        return f(*func_args, **func_kwargs)
      File "/usr/lib/python2.7/site-packages/tempest/scenario/test_network_basic_ops.py", line 409, in test_network_basic_ops
        self._check_network_external_connectivity()
      File "/usr/lib/python2.7/site-packages/tempest/scenario/test_network_basic_ops.py", line 342, in _check_network_external_connecti
vity
        "Found %d IPv4 subnets" % len(v4_subnets))
      File "/usr/lib/python2.7/site-packages/testtools/testcase.py", line 350, in assertEqual
        self.assertThat(observed, matcher, message)
      File "/usr/lib/python2.7/site-packages/testtools/testcase.py", line 435, in assertThat
        raise mismatch_error
    testtools.matchers._impl.MismatchError: 1 != 3: Found 3 IPv4 subnets

Comment 3 Martin Kopec 2019-12-10 10:20:47 UTC
*** Bug 1780619 has been marked as a duplicate of this bug. ***

Comment 4 Martin Kopec 2019-12-10 16:10:51 UTC
Hi Mauro,

from what I've gathered so far, the check [1] is there for historical reasons, a few years back it just didn't work with multiple subnets, not just the tests, the whole OpenStack or something like that but that was 6 years ago. Although our official documentation states that creating a public network and one subnet is a prerequisite for running tempest tests, I think the test could be modify nowadays and done a little different way. Let me ask around and bring this topic in an upstream meeting as well to gather more info and opinions about that. Meanwhile you can use tempest cleanup [2] to remove unwanted (and leftover) subnets after test execution.

[1] https://github.com/openstack/tempest/blob/ab3f72b21497bdc913cf92673d858e5767a5dd93/tempest/scenario/test_network_basic_ops.py#L349
[2] https://docs.openstack.org/tempest/latest/cleanup.html

Comment 6 ext-markku.tavasti 2019-12-11 15:13:30 UTC
We have 2 separate subnets in our external network on purpose, and removing one of them is not option, because that would break our cloud functionality.

Comment 7 Martin Kopec 2020-03-11 08:19:28 UTC
waiting for upstream review

Comment 17 Martin Kopec 2020-05-27 08:56:47 UTC
A new tempest config option has been introduced in the Fixed in version package, subnet_id under [network] section of a tempest.conf file, which allows a user to specify the id of a subnet which is supposed to be used in case there are multiple ipv4 subnets present.

In case a tested environment has multiple subnets present, network.subnet_id is set to the desired one, and at least openstack-tempest-18.0.0-14 is installed, the test is no longer failing on the ipv4 subnet mismatch. Therefore I'm marking this BZ as VERIFIED.

Comment 19 errata-xmlrpc 2020-06-24 11:41:26 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-2020:2719


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