Bug 1021354
Summary: | [Functional] UTF-8 functional testcases are failing with keystone auth | ||
---|---|---|---|
Product: | [Red Hat Storage] Red Hat Gluster Storage | Reporter: | pushpesh sharma <psharma> |
Component: | gluster-swift | Assignee: | Luis Pabón <lpabon> |
Status: | CLOSED NOTABUG | QA Contact: | pushpesh sharma <psharma> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 2.1 | CC: | bbandari, grajaiya, madam, rhs-bugs, shaines, vagarwal |
Target Milestone: | --- | Keywords: | ZStream |
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2013-10-29 21:11:15 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: |
Description
pushpesh sharma
2013-10-21 07:07:32 UTC
Pushpesh and I have tested and confirmed the issue. The issue seems to be a bug in the functional tests themselves. I will backport the OpenStack Swift patch to the functional tests and try it out again. Luis, The the problem was reproducible on a RHOS-swift setup as well. The issue which i find earlier with functional TC https://bugs.launchpad.net/swift/+bug/1190190 is not the problem as I hit the issue on a RHOS-grizzly setup while executing latest upstream functional TCs (havana based). I am not sure if functional cases have an issue or the swift-code.However,if you and Peter are of the opinion that it is the problem with swift-test-client,then i dont see the issue as a blocker for RHS2.1-U1. I logging an upstream issue for this.We can also take the opinion of RHOS team on this. Ok, let me investigate further. I will have a reply by Oct 24 EDT. I need some time to setup my own keystone <--> RHS env to debug this issue. I have found that the fix for the main functional tests is as follows (Please make sure to use the tests from grizzly branch -- git checkout -b grizzly origin/grizzly ): diff --git a/test/functional/swift_test_client.py b/test/functional/swift_test_client.py index 65a6824..0dc3103 100644 --- a/test/functional/swift_test_client.py +++ b/test/functional/swift_test_client.py @@ -170,9 +170,9 @@ class Connection(object): self.storage_host = x[2].split(':')[0] if ':' in x[2]: self.storage_port = int(x[2].split(':')[1]) - self.storage_url = '/%s/%s' % (x[3], x[4]) + self.storage_url = str('/%s/%s' % (x[3], x[4])) - self.storage_token = storage_token + self.storage_token = str(storage_token) Not only does the storage url need to be converted, but also the token. Once I have done this, I started working on the functionalnose tests. To work with these tests you need to setup a test2 tenant in Keystone with username and password as specified in /etc/swift/test.conf. Lastly, you need one more user, tester3 but part of tenant 'test' as specified in /etc/swift/test.conf. Currently my failures on the functionalnose tests seem to be due to 'public' access, meaning trying to access a container without a token: [root@localhost gluster-swift]# nosetests -v --exe -s test/functionalnosetests/ test_bad_metadata (test.functionalnosetests.test_account.TestAccount) ... ok test_metadata (test.functionalnosetests.test_account.TestAccount) ... ok test_multi_metadata (test.functionalnosetests.test_account.TestAccount) ... ok test_POST_bad_metadata (test.functionalnosetests.test_container.TestContainer) ... ok test_POST_metadata (test.functionalnosetests.test_container.TestContainer) ... ok test_PUT_bad_metadata (test.functionalnosetests.test_container.TestContainer) ... ok test_PUT_metadata (test.functionalnosetests.test_container.TestContainer) ... ok test_cross_account_container (test.functionalnosetests.test_container.TestContainer) ... ok test_cross_account_public_container (test.functionalnosetests.test_container.TestContainer) ... ok test_long_name_content_type (test.functionalnosetests.test_container.TestContainer) ... ok test_multi_metadata (test.functionalnosetests.test_container.TestContainer) ... ok test_nonadmin_user (test.functionalnosetests.test_container.TestContainer) ... ok test_null_name (test.functionalnosetests.test_container.TestContainer) ... ok test_public_container (test.functionalnosetests.test_container.TestContainer) ... > /root/gluster-swift/test/functionalnosetests/test_container.py(361)test_public_container() -> def get(url, token, parsed, conn): (Pdb) c ERROR test_copy_object (test.functionalnosetests.test_object.TestObject) ... ok test_delete_content_type (test.functionalnosetests.test_object.TestObject) ... ok test_manifest (test.functionalnosetests.test_object.TestObject) ... ok test_null_name (test.functionalnosetests.test_object.TestObject) ... ok test_private_object (test.functionalnosetests.test_object.TestObject) ... ok test_public_object (test.functionalnosetests.test_object.TestObject) ... ERROR ** More info to come, but at least the simple diff will run most of the functional tests against a Keystone configuration. Definitely better results with small changes in swift_test_client.py.The issue seems with functional tests only.We can close this BZ as "Not a BUG" based on these observations. [root@dhcp207-15 gluster-swift]# ./functests.sh ..............F..............F.......F...............SSS......F...............................E........E...................................E........E......... ====================================================================== ERROR: testFileSizeLimit (test.functional.tests.TestFile) ---------------------------------------------------------------------- Traceback (most recent call last): File "/root/gluster-swift/test/functional/tests.py", line 1254, in testFileSizeLimit cfg={'set_content_length': i})) File "/root/gluster-swift/test/functional/tests.py", line 154, in timeout raise t.exception ResponseError: 413: Request Entity Too Large ====================================================================== ERROR: testNameLimit (test.functional.tests.TestFile) ---------------------------------------------------------------------- Traceback (most recent call last): File "/root/gluster-swift/test/functional/tests.py", line 1085, in testNameLimit self.assert_(file.write()) File "/root/gluster-swift/test/functional/swift_test_client.py", line 740, in write raise ResponseError(self.conn.response) ResponseError: 400: Bad Request ====================================================================== ERROR: testFileSizeLimit (test.functional.tests.TestFileUTF8) ---------------------------------------------------------------------- Traceback (most recent call last): File "/root/gluster-swift/test/functional/tests.py", line 1254, in testFileSizeLimit cfg={'set_content_length': i})) File "/root/gluster-swift/test/functional/tests.py", line 154, in timeout raise t.exception ResponseError: 413: Request Entity Too Large ====================================================================== ERROR: testNameLimit (test.functional.tests.TestFileUTF8) ---------------------------------------------------------------------- Traceback (most recent call last): File "/root/gluster-swift/test/functional/tests.py", line 1085, in testNameLimit self.assert_(file.write()) File "/root/gluster-swift/test/functional/swift_test_client.py", line 740, in write raise ResponseError(self.conn.response) ResponseError: 400: Bad Request ====================================================================== FAIL: testPUT (test.functional.tests.TestAccount) ---------------------------------------------------------------------- Traceback (most recent call last): File "/root/gluster-swift/test/functional/tests.py", line 281, in testPUT self.assert_status([403, 405]) File "/root/gluster-swift/test/functional/tests.py", line 202, in assert_status (self.env.conn.response.status, status_or_statuses)) AssertionError: Status returned: 202 Expected: [403, 405] ====================================================================== FAIL: testPUT (test.functional.tests.TestAccountUTF8) ---------------------------------------------------------------------- Traceback (most recent call last): File "/root/gluster-swift/test/functional/tests.py", line 281, in testPUT self.assert_status([403, 405]) File "/root/gluster-swift/test/functional/tests.py", line 202, in assert_status (self.env.conn.response.status, status_or_statuses)) AssertionError: Status returned: 202 Expected: [403, 405] ====================================================================== FAIL: testContainerNameLimit (test.functional.tests.TestContainer) ---------------------------------------------------------------------- Traceback (most recent call last): File "/root/gluster-swift/test/functional/tests.py", line 472, in testContainerNameLimit self.assert_(not cont.create()) AssertionError ====================================================================== FAIL: testContainerNameLimit (test.functional.tests.TestContainerUTF8) ---------------------------------------------------------------------- Traceback (most recent call last): File "/root/gluster-swift/test/functional/tests.py", line 472, in testContainerNameLimit self.assert_(not cont.create()) AssertionError ---------------------------------------------------------------------- Ran 158 tests in 197.960s FAILED (SKIP=3, errors=4, failures=4) /root/gluster-swift .............E.....E ====================================================================== ERROR: test_public_container (test.functionalnosetests.test_container.TestContainer) ---------------------------------------------------------------------- Traceback (most recent call last): File "/root/gluster-swift/test/functionalnosetests/test_container.py", line 376, in test_public_container resp = retry(get) File "/root/gluster-swift/test/functionalnosetests/swift_testing.py", line 179, in retry raise Exception('No result after %s retries.' % retries) Exception: No result after 5 retries. ====================================================================== ERROR: test_public_object (test.functionalnosetests.test_object.TestObject) ---------------------------------------------------------------------- Traceback (most recent call last): File "/root/gluster-swift/test/functionalnosetests/test_object.py", line 200, in test_public_object resp = retry(get) File "/root/gluster-swift/test/functionalnosetests/swift_testing.py", line 179, in retry raise Exception('No result after %s retries.' % retries) Exception: No result after 5 retries. ---------------------------------------------------------------------- Ran 20 tests in 33.578s FAILED (errors=2) /root/gluster-swift |