Activity log for bug #1541312

Date Who What changed Old value New value Message
2016-02-03 10:38:00 Ramana Raja bug added bug
2016-02-03 10:38:52 Ramana Raja summary race between api tempest test across classes in 'test_rules' module race between api tempest tests across classes in 'test_rules' module
2016-02-03 10:40:55 Ramana Raja tags tempest
2016-02-03 11:40:00 Ramana Raja 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 reset as 'GLUSTERFS' by a tempest run of different test class in an another thread. Need to serialize tests similar to what is suggested here, http://docs.openstack.org/developer/tempest/HACKING.html#parallel-test-execution 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.
2016-02-03 12:06:33 Ramana Raja manila: status New Invalid