Project

General

Profile

Bug #10268

s3tests.functional.test_s3.test_bucket_create_exists fails with 'S3CreateError not raised'

Added by Sage Weil over 9 years ago. Updated about 9 years ago.

Status:
Resolved
Priority:
High
Assignee:
Target version:
-
% Done:

100%

Source:
Q/A
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

2014-12-07T07:54:07.801 INFO:teuthology.orchestra.run.burnupi50.stderr:======================================================================
2014-12-07T07:54:07.801 INFO:teuthology.orchestra.run.burnupi50.stderr:FAIL: s3tests.functional.test_s3.test_bucket_create_exists
2014-12-07T07:54:07.802 INFO:teuthology.orchestra.run.burnupi50.stderr:----------------------------------------------------------------------
2014-12-07T07:54:07.802 INFO:teuthology.orchestra.run.burnupi50.stderr:Traceback (most recent call last):
2014-12-07T07:54:07.802 INFO:teuthology.orchestra.run.burnupi50.stderr:  File "/home/ubuntu/cephtest/s3-tests/virtualenv/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
2014-12-07T07:54:07.802 INFO:teuthology.orchestra.run.burnupi50.stderr:    self.test(*self.arg)
2014-12-07T07:54:07.802 INFO:teuthology.orchestra.run.burnupi50.stderr:  File "/home/ubuntu/cephtest/s3-tests/s3tests/functional/test_s3.py", line 2664, in test_bucket_create_exists
2014-12-07T07:54:07.803 INFO:teuthology.orchestra.run.burnupi50.stderr:    e = assert_raises(boto.exception.S3CreateError, get_new_bucket, targets.main.default, bucket.name)
2014-12-07T07:54:07.803 INFO:teuthology.orchestra.run.burnupi50.stderr:  File "/home/ubuntu/cephtest/s3-tests/s3tests/functional/utils.py", line 19, in assert_raises
2014-12-07T07:54:07.803 INFO:teuthology.orchestra.run.burnupi50.stderr:    raise AssertionError("%s not raised" % excName)
2014-12-07T07:54:07.803 INFO:teuthology.orchestra.run.burnupi50.stderr:AssertionError: S3CreateError not raised
2014-12-07T07:54:07.803 INFO:teuthology.orchestra.run.burnupi50.stderr:-------------------- >> begin captured logging << --------------------
2014-12-07T07:54:07.803 INFO:teuthology.orchestra.run.burnupi50.stderr:boto: DEBUG: path=/test-client.0-21bha90ieefjnd2-151/
2014-12-07T07:54:07.804 INFO:teuthology.orchestra.run.burnupi50.stderr:boto: DEBUG: auth_path=/test-client.0-21bha90ieefjnd2-151/
2014-12-07T07:54:07.804 INFO:teuthology.orchestra.run.burnupi50.stderr:boto: DEBUG: Method: PUT
2014-12-07T07:54:07.804 INFO:teuthology.orchestra.run.burnupi50.stderr:boto: DEBUG: Path: /test-client.0-21bha90ieefjnd2-151/
2014-12-07T07:54:07.804 INFO:teuthology.orchestra.run.burnupi50.stderr:boto: DEBUG: Data:
2014-12-07T07:54:07.804 INFO:teuthology.orchestra.run.burnupi50.stderr:boto: DEBUG: Headers: {}
2014-12-07T07:54:07.804 INFO:teuthology.orchestra.run.burnupi50.stderr:boto: DEBUG: Host: burnupi50.front.sepia.ceph.com:7280
2014-12-07T07:54:07.804 INFO:teuthology.orchestra.run.burnupi50.stderr:boto: DEBUG: Port: 7280
2014-12-07T07:54:07.805 INFO:teuthology.orchestra.run.burnupi50.stderr:boto: DEBUG: Params: {}
2014-12-07T07:54:07.805 INFO:teuthology.orchestra.run.burnupi50.stderr:boto: DEBUG: Token: None
2014-12-07T07:54:07.805 INFO:teuthology.orchestra.run.burnupi50.stderr:boto: DEBUG: StringToSign:
2014-12-07T07:54:07.805 INFO:teuthology.orchestra.run.burnupi50.stderr:PUT
2014-12-07T07:54:07.805 INFO:teuthology.orchestra.run.burnupi50.stderr:
2014-12-07T07:54:07.806 INFO:teuthology.orchestra.run.burnupi50.stderr:
2014-12-07T07:54:07.806 INFO:teuthology.orchestra.run.burnupi50.stderr:Sun, 07 Dec 2014 15:53:19 GMT
2014-12-07T07:54:07.806 INFO:teuthology.orchestra.run.burnupi50.stderr:/test-client.0-21bha90ieefjnd2-151/
2014-12-07T07:54:07.806 INFO:teuthology.orchestra.run.burnupi50.stderr:boto: DEBUG: Signature:
2014-12-07T07:54:07.806 INFO:teuthology.orchestra.run.burnupi50.stderr:AWS IRQEHPHPOJLJXUVDNRKA:Gy/QyOLWN9Ivs2uyQLX0Uw/gnr0=
2014-12-07T07:54:07.806 INFO:teuthology.orchestra.run.burnupi50.stderr:boto: DEBUG: Final headers: {'Date': 'Sun, 07 Dec 2014 15:53:19 GMT', 'Content-Length': 0, 'Authorization': u'AWS IRQEHPHPOJLJXUVDNRKA:Gy/QyOLWN9Ivs2uyQLX0Uw/gnr0=', 'User-Agent': 'Boto/2.34.0 Python/2.7.6 Linux/3.13.0-40-generic'}
2014-12-07T07:54:07.806 INFO:teuthology.orchestra.run.burnupi50.stderr:boto: DEBUG: Response headers: [('date', 'Sun, 07 Dec 2014 15:53:19 GMT'), ('transfer-encoding', 'chunked'), ('content-type', 'application/xml'), ('server', 'Apache/2.4.7 (Ubuntu) mod_fastcgi/mod_fastcgi-SNAP-0910052141')]
2014-12-07T07:54:07.807 INFO:teuthology.orchestra.run.burnupi50.stderr:boto: DEBUG: path=/test-client.0-21bha90ieefjnd2-151/
2014-12-07T07:54:07.807 INFO:teuthology.orchestra.run.burnupi50.stderr:boto: DEBUG: auth_path=/test-client.0-21bha90ieefjnd2-151/
2014-12-07T07:54:07.807 INFO:teuthology.orchestra.run.burnupi50.stderr:boto: DEBUG: Method: PUT
2014-12-07T07:54:07.807 INFO:teuthology.orchestra.run.burnupi50.stderr:boto: DEBUG: Path: /test-client.0-21bha90ieefjnd2-151/
2014-12-07T07:54:07.807 INFO:teuthology.orchestra.run.burnupi50.stderr:boto: DEBUG: Data:
2014-12-07T07:54:07.807 INFO:teuthology.orchestra.run.burnupi50.stderr:boto: DEBUG: Headers: {}
2014-12-07T07:54:07.807 INFO:teuthology.orchestra.run.burnupi50.stderr:boto: DEBUG: Host: burnupi50.front.sepia.ceph.com:7280
2014-12-07T07:54:07.808 INFO:teuthology.orchestra.run.burnupi50.stderr:boto: DEBUG: Port: 7280
2014-12-07T07:54:07.808 INFO:teuthology.orchestra.run.burnupi50.stderr:boto: DEBUG: Params: {}
2014-12-07T07:54:07.808 INFO:teuthology.orchestra.run.burnupi50.stderr:boto: DEBUG: Token: None
2014-12-07T07:54:07.808 INFO:teuthology.orchestra.run.burnupi50.stderr:boto: DEBUG: StringToSign:
2014-12-07T07:54:07.808 INFO:teuthology.orchestra.run.burnupi50.stderr:PUT
2014-12-07T07:54:07.808 INFO:teuthology.orchestra.run.burnupi50.stderr:
2014-12-07T07:54:07.809 INFO:teuthology.orchestra.run.burnupi50.stderr:
2014-12-07T07:54:07.809 INFO:teuthology.orchestra.run.burnupi50.stderr:Sun, 07 Dec 2014 15:53:19 GMT
2014-12-07T07:54:07.809 INFO:teuthology.orchestra.run.burnupi50.stderr:/test-client.0-21bha90ieefjnd2-151/
2014-12-07T07:54:07.809 INFO:teuthology.orchestra.run.burnupi50.stderr:boto: DEBUG: Signature:
2014-12-07T07:54:07.809 INFO:teuthology.orchestra.run.burnupi50.stderr:AWS IRQEHPHPOJLJXUVDNRKA:Gy/QyOLWN9Ivs2uyQLX0Uw/gnr0=
2014-12-07T07:54:07.810 INFO:teuthology.orchestra.run.burnupi50.stderr:boto: DEBUG: Final headers: {'Date': 'Sun, 07 Dec 2014 15:53:19 GMT', 'Content-Length': 0, 'Authorization': u'AWS IRQEHPHPOJLJXUVDNRKA:Gy/QyOLWN9Ivs2uyQLX0Uw/gnr0=', 'User-Agent': 'Boto/2.34.0 Python/2.7.6 Linux/3.13.0-40-generic'}
2014-12-07T07:54:07.810 INFO:teuthology.orchestra.run.burnupi50.stderr:boto: DEBUG: Response headers: [('date', 'Sun, 07 Dec 2014 15:53:19 GMT'), ('transfer-encoding', 'chunked'), ('content-type', 'application/xml'), ('server', 'Apache/2.4.7 (Ubuntu) mod_fastcgi/mod_fastcgi-SNAP-0910052141')]
2014-12-07T07:54:07.810 INFO:teuthology.orchestra.run.burnupi50.stderr:--------------------- >> end captured logging << ---------------------

also,

2014-12-07T07:54:07.810 INFO:teuthology.orchestra.run.burnupi50.stderr:======================================================================
2014-12-07T07:54:07.810 INFO:teuthology.orchestra.run.burnupi50.stderr:FAIL: s3tests.functional.test_s3.test_list_buckets_invalid_auth
2014-12-07T07:54:07.810 INFO:teuthology.orchestra.run.burnupi50.stderr:----------------------------------------------------------------------
2014-12-07T07:54:07.811 INFO:teuthology.orchestra.run.burnupi50.stderr:Traceback (most recent call last):
2014-12-07T07:54:07.811 INFO:teuthology.orchestra.run.burnupi50.stderr:  File "/home/ubuntu/cephtest/s3-tests/virtualenv/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
2014-12-07T07:54:07.811 INFO:teuthology.orchestra.run.burnupi50.stderr:    self.test(*self.arg)
2014-12-07T07:54:07.811 INFO:teuthology.orchestra.run.burnupi50.stderr:  File "/home/ubuntu/cephtest/s3-tests/s3tests/functional/test_s3.py", line 3947, in test_list_buckets_invalid_auth
2014-12-07T07:54:07.811 INFO:teuthology.orchestra.run.burnupi50.stderr:    eq(e.error_code, 'InvalidAccessKeyId')
2014-12-07T07:54:07.811 INFO:teuthology.orchestra.run.burnupi50.stderr:AssertionError: u'AccessDenied' != 'InvalidAccessKeyId'
2014-12-07T07:54:07.811 INFO:teuthology.orchestra.run.burnupi50.stderr:-------------------- >> begin captured logging << --------------------

and
2014-12-07T07:54:07.815 INFO:teuthology.orchestra.run.burnupi50.stderr:======================================================================
2014-12-07T07:54:07.815 INFO:teuthology.orchestra.run.burnupi50.stderr:FAIL: s3tests.functional.test_s3.test_list_buckets_bad_auth
2014-12-07T07:54:07.815 INFO:teuthology.orchestra.run.burnupi50.stderr:----------------------------------------------------------------------
2014-12-07T07:54:07.815 INFO:teuthology.orchestra.run.burnupi50.stderr:Traceback (most recent call last):
2014-12-07T07:54:07.816 INFO:teuthology.orchestra.run.burnupi50.stderr:  File "/home/ubuntu/cephtest/s3-tests/virtualenv/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
2014-12-07T07:54:07.816 INFO:teuthology.orchestra.run.burnupi50.stderr:    self.test(*self.arg)
2014-12-07T07:54:07.816 INFO:teuthology.orchestra.run.burnupi50.stderr:  File "/home/ubuntu/cephtest/s3-tests/s3tests/functional/test_s3.py", line 3958, in test_list_buckets_bad_auth
2014-12-07T07:54:07.816 INFO:teuthology.orchestra.run.burnupi50.stderr:    eq(e.error_code, 'SignatureDoesNotMatch')
2014-12-07T07:54:07.816 INFO:teuthology.orchestra.run.burnupi50.stderr:AssertionError: u'AccessDenied' != 'SignatureDoesNotMatch'
2014-12-07T07:54:07.816 INFO:teuthology.orchestra.run.burnupi50.stderr:-------------------- >> begin captured logging << --------------------

ubuntu@teuthology:/a/teuthology-2014-12-06_02:35:03-smoke-master-distro-basic-multi/639619

Subtasks

Bug #10329: rgw: s3 need to return SignatureDoesNotMatch instead of AccessDeniedResolvedYehuda Sadeh

Bug #10334: rgw: s3 need to return InvalidAccessKeyId instead of AccessDeniedResolvedYehuda Sadeh

History

#1 Updated by Sage Weil over 9 years ago

ubuntu@teuthology:/a/teuthology-2014-12-08_02:35:02-smoke-master-distro-basic-multi/642112

#2 Updated by Yehuda Sadeh over 9 years ago

  • Assignee set to Alfredo Deza

#3 Updated by Alfredo Deza over 9 years ago

  • Status changed from New to In Progress

Reverted first test. S3 docs state a duality in behavior depending on US Standard vs Regions and we support the former behavior.

Revert link: https://github.com/ceph/s3-tests/commit/abc9e67120351f72b97509183edd92f42af48310

#4 Updated by Alfredo Deza over 9 years ago

The second failure I can confirm it is a problem with RGW, it should return 'InvalidAccessKeyId':

In [15]: conn
Out[15]: S3Connection:s3.amazonaws.com

In [16]: conn.get_all_buckets()
---------------------------------------------------------------------------
S3ResponseError                           Traceback (most recent call last)
<ipython-input-16-b523b3151026> in <module>()
----> 1 conn.get_all_buckets()

/Users/alfredo/.virtualenvs/s3/lib/python2.7/site-packages/boto-2.34.0-py2.7.egg/boto/s3/connection.pyc in get_all_buckets(self, headers)
    438         if response.status > 300:
    439             raise self.provider.storage_response_error(
--> 440                 response.status, response.reason, body)
    441         rs = ResultSet([('Bucket', self.bucket_class)])
    442         h = handler.XmlHandler(rs, self)

S3ResponseError: S3ResponseError: 403 Forbidden
<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>InvalidAccessKeyId</Code><Message>The AWS Access Key Id you provided does not exist in our records.</Message><AWSAccessKeyId>bad</AWSAccessKeyId><RequestId>B59AAED8E3DB7127</RequestId><HostId>cNuxuXsaN949xOlwIFPnY34Qc0wgsELvQ4qDu9pr/M6S/SosuPNl/cvA4iUOupO0</HostId></Error>

#5 Updated by Alfredo Deza over 9 years ago

And the last one is correct too, using a valid Key ID but a wrong access_key on S3:

In [25]: conn = boto.s3.connection.S3Connection(
aws_access_key_id='****VALIDKEYID****',
aws_secret_access_key='bad key',)

In [26]: conn.get_all_buckets()
---------------------------------------------------------------------------
S3ResponseError                           Traceback (most recent call last)
<ipython-input-26-b523b3151026> in <module>()
----> 1 conn.get_all_buckets()

/Users/alfredo/.virtualenvs/s3/lib/python2.7/site-packages/boto-2.34.0-py2.7.egg/boto/s3/connection.pyc in get_all_buckets(self, headers)
    438         if response.status > 300:
    439             raise self.provider.storage_response_error(
--> 440                 response.status, response.reason, body)
    441         rs = ResultSet([('Bucket', self.bucket_class)])
    442         h = handler.XmlHandler(rs, self)

S3ResponseError: S3ResponseError: 403 Forbidden
<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>SignatureDoesNotMatch</Code><Message>The request signature we calculated does not match the signature you provided. Check your key and signing method.</Message><AWSAccessKeyId>****VALIDKEYID****</AWSAccessKeyId><StringToSign>GET

Mon, 15 Dec 2014 20:40:29 GMT
/</StringToSign><SignatureProvided>9Rqh2xbzM9ezJzJ3yln1QB5Qd5w=</SignatureProvided><StringToSignBytes>47 45 54 0a 0a 0a 4d 6f 6e 2c 20 31 35 20 44 65 63 20 32 30 31 34 20 32 30 3a 34 30 3a 32 39 20 47 4d 54 0a 2f</StringToSignBytes><RequestId>8828BC0F823BCCA9</RequestId><HostId>CvoyriEtNPnzukOQKT76f4aJnypFtdnVKAPUqVe3vbVJgrqXnBnlp+d2RspaG9HGD7Nsmljn9Ck=</HostId></Error>

#6 Updated by Alfredo Deza over 9 years ago

  • Status changed from In Progress to 12
  • Assignee changed from Alfredo Deza to Yehuda Sadeh

#7 Updated by Josh Durgin about 9 years ago

  • Status changed from 12 to Pending Backport

#8 Updated by Sage Weil about 9 years ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF