race between api tempest tests across classes in 'test_rules' module

Bug #1541312 reported by Ramana Raja
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Invalid
Undecided
Unassigned

Bug Description

The API tempest test run of the cephfs-native CI, 'gate-manila-tempest-dsvm-cephfs-native', fails as it encounters a race between tests across classes.

The API tests are run by the CI as,
`/bin/bash tools/pretty_tox.sh manila_tempest_tests.tests.api --concurrency=12`

The lone test that fails,
 | setUpClass (manila_tempest_tests.tests.api.test_rules.ShareRulesTest)
 | ---------------------------------------------------------------------
 |
 | Captured traceback:
 | ~~~~~~~~~~~~~~~~~~~
 | Traceback (most recent call last):
 | File "tempest/test.py", line 262, in setUpClass
 | six.reraise(etype, value, trace)
 | File "tempest/test.py", line 255, in setUpClass
 | cls.resource_setup()
 | File "/opt/stack/new/manila/manila_tempest_tests/tests/api/test_rules.py", line 320, in resource_setup
 | cls.share = cls.create_share()
 | File "/opt/stack/new/manila/manila_tempest_tests/tests/api/base.py", line 348, in create_share
 | result = cls.create_shares([{"args": args, "kwargs": kwargs}])
 | File "/opt/stack/new/manila/manila_tempest_tests/tests/api/base.py", line 383, in create_shares
 | d["share"] = cls._create_share(*d["args"], **d["kwargs"])
 | File "/opt/stack/new/manila/manila_tempest_tests/tests/api/base.py", line 329, in _create_share
 | share = client.create_share(**kwargs)
 | File "/opt/stack/new/manila/manila_tempest_tests/services/share/v2/json/shares_client.py", line 218, in create_share
 | resp, body = self.post("shares", body, version=version)
 | File "/opt/stack/new/manila/manila_tempest_tests/services/share/v2/json/shares_client.py", line 60, in post
 | return super(SharesV2Client, self).post(url, body, headers=headers)
 | File "/usr/local/lib/python2.7/dist-packages/tempest_lib/common/rest_client.py", line 259, in post
 | return self.request('POST', url, extra_headers, headers, body)
 | File "/usr/local/lib/python2.7/dist-packages/tempest_lib/common/rest_client.py", line 640, in request
 | resp, resp_body)
 | File "/usr/local/lib/python2.7/dist-packages/tempest_lib/common/rest_client.py", line 698, in _error_checker
 | raise exceptions.BadRequest(resp_body, resp=resp)
 | tempest_lib.exceptions.BadRequest: Bad request
 | Details: {u'code': 400, u'message': u"Invalid input received: Invalid share protocol provided: GLUSTERFS. It is either disabled or unsupported. Available protocols: ['CEPHFS']."}

The above test fails because the class attribute 'protocol' is incorrectly set as 'GLUSTERFS' by a tempest run of different test class in an another thread.

Solution
vponomaryov: eliminate concurrent update of shared python objects.

Tags: tempest
Ramana Raja (rraja)
summary: - race between api tempest test across classes in 'test_rules' module
+ race between api tempest tests across classes in 'test_rules' module
tags: added: tempest
Ramana Raja (rraja)
description: updated
Revision history for this message
Valeriy Ponomaryov (vponomaryov) wrote :

CephFS tempest not configured properly, see http://logs.openstack.org/11/270211/11/experimental/gate-manila-tempest-dsvm-cephfs-native/116d3ab/logs/tempest.txt.gz#_2016-02-02_20_27_53_310

just set opt "enable_cert_rules_for_protocols" to empty value
it will solve this problem
right now, it has "glusterfs" value and condition on line 311 in https://review.openstack.org/#/c/270211/11/manila_tempest_tests/tests/api/test_rules.py is True

Revision history for this message
Valeriy Ponomaryov (vponomaryov) wrote :

Nothing to do in Manila about this bug

Ramana Raja (rraja)
Changed in manila:
status: New → Invalid
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.