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
*** Bug 1780619 has been marked as a duplicate of this bug. ***
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
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.
waiting for upstream review
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.
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