Bug 1433696

Summary: Tests in neutron.tests.tempest.api.test_revisions.TestRevisions don't clean up network resources
Product: Red Hat OpenStack Reporter: Eran Kuris <ekuris>
Component: openstack-neutronAssignee: Ihar Hrachyshka <ihrachys>
Status: CLOSED ERRATA QA Contact: Eran Kuris <ekuris>
Severity: high Docs Contact:
Priority: high    
Version: 11.0 (Ocata)CC: amuller, apevec, chrisw, ihrachys, jlibosva, jschluet, lhh, mmagr, nyechiel, oblaut, parora, slinaber, srevivo
Target Milestone: betaKeywords: Triaged
Target Release: 11.0 (Ocata)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-neutron-10.0.0-9.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1433698 (view as bug list) Environment:
Last Closed: 2017-05-17 20:09:12 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:    
Bug Blocks: 1433698    

Description Eran Kuris 2017-03-19 12:07:06 UTC
Description of problem:
In our CI those tests failed .
We run our CI with default network quotas parameters (10) as a result  when all tests run it fails when system reach to 10 networks.

neutron.tests.tempest.api.test_revisions.TestRevisions.test_update_router_bumps_revision
neutron.tests.tempest.api.test_revisions.TestRevisions.test_update_router_extra_routes_bumps_revision
neutron.tests.tempest.api.test_revisions.TestRevisions.test_update_subnet_bumps_network_revision
neutron.tests.tempest.api.test_revisions.TestRevisions.test_update_subnet_bumps_revision
neutron.tests.tempest.api.test_revisions.TestRevisions.test_update_subnet_service_types_bumps_revisions

Version-Release number of selected component (if applicable):
openstack-tempest-15.0.0-1.el7ost.noarch
puppet-tempest-10.3.0-0.20170210202111.47a23ee.el7ost.noarch
python-tempest-15.0.0-1.el7ost.noarch
python-tempestconf-1.0.1-0.20170307153443.0890319.el7ost.noarch

How reproducible:
always 

Steps to Reproduce:
1.run tempest : neutron.tests.tempest.api.test_revisions.TestRevisions*
2.
3.

Actual results:
 Failed 7 times in the last 7 runs. Stability: 0 %
Stacktrace

Traceback (most recent call last):
testtools.testresult.real._StringException: Empty attachments:
  stderr
  stdout

pythonlogging:'': {{{
2017-03-19 05:03:56,640 32150 INFO     [tempest.lib.common.rest_client] Request (TestRevisions:test_update_subnet_bumps_network_revision): 409 POST http://10.0.0.102:9696/v2.0/networks 0.032s
2017-03-19 05:03:56,641 32150 DEBUG    [tempest.lib.common.rest_client] Request - Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': '<omitted>'}
        Body: {"network": {"name": "test-network--896537325"}}
    Response - Headers: {'status': '409', u'content-length': '110', 'content-location': 'http://10.0.0.102:9696/v2.0/networks', u'date': 'Sun, 19 Mar 2017 09:03:57 GMT', u'content-type': 'application/json', u'connection': 'close', u'x-openstack-request-id': 'req-b4cb52e3-57e1-46c8-8648-a1abf053ca94'}
        Body: {"NeutronError": {"message": "Quota exceeded for resources: ['network'].", "type": "OverQuota", "detail": ""}}
}}}

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/neutron/tests/tempest/api/test_revisions.py", line 66, in test_update_subnet_bumps_network_revision
    net = self.create_network()
  File "/usr/lib/python2.7/site-packages/neutron/tests/tempest/api/base.py", line 220, in create_network
    body = cls.client.create_network(name=network_name, **kwargs)
  File "/usr/lib/python2.7/site-packages/neutron/tests/tempest/services/network/json/network_client.py", line 142, in _create
    resp, body = self.post(uri, post_data)
  File "/usr/lib/python2.7/site-packages/tempest/lib/common/rest_client.py", line 276, in post
    return self.request('POST', url, extra_headers, headers, body, chunked)
  File "/usr/lib/python2.7/site-packages/tempest/lib/common/rest_client.py", line 665, in request
    self._error_checker(resp, resp_body)
  File "/usr/lib/python2.7/site-packages/tempest/lib/common/rest_client.py", line 777, in _error_checker
    raise exceptions.Conflict(resp_body, resp=resp)
tempest.lib.exceptions.Conflict: An object with that identifier already exists
Details: {u'message': u"Quota exceeded for resources: ['network'].", u'type': u'OverQuota', u'detail': u''}


Expected results:


Additional info:

Comment 2 Ihar Hrachyshka 2017-03-23 16:26:02 UTC
The right solution would be tempest tests defining the minimum quotas needed for successful test run, if different from default; and then tempest setting those quotas for test tenants before executing test cases.

A short term solution is bumping quotas, in infrared or in neutron.

For neutron side, we are working on https://code.engineering.redhat.com/gerrit/#/q/topic:1433696

Comment 3 Ihar Hrachyshka 2017-03-27 17:45:37 UTC
The test is defined in neutron itself, switching component to openstack-neutron.

Comment 6 Eran Kuris 2017-03-30 05:49:28 UTC
fixed, verified 
osp-11 
openstack-neutron-10.0.0-10.el7ost.noarch

Comment 8 errata-xmlrpc 2017-05-17 20:09:12 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/RHEA-2017:1245