Bug 1734550
Summary: | GetBucketLocation on non-existing bucket doesn't throw NoSuchBucket and gives 200 | ||
---|---|---|---|
Product: | [Red Hat Storage] Red Hat Ceph Storage | Reporter: | Vikhyat Umrao <vumrao> |
Component: | RGW | Assignee: | Matt Benjamin (redhat) <mbenjamin> |
Status: | CLOSED ERRATA | QA Contact: | RUDRA PRATAP <rpratap> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 3.2 | CC: | assingh, cbodley, ceph-eng-bugs, kbader, mbenjamin, rpratap, sbaldwin, sweil, tchandra, tserlin |
Target Milestone: | rc | ||
Target Release: | 3.3 | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | RHEL: ceph-12.2.12-1.el7cp Ubuntu: ceph_12.2.12-4redhat1xenial | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2019-08-21 15:11:10 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: | 1725227 |
Description
Vikhyat Umrao
2019-07-30 20:34:19 UTC
Hi Matt, I was looking into the code which went with this Bug 1705922(https://github.com/ceph/ceph/pull/26569) and built it with a vstart cluster but looks like it was fixed way before this patch as this is still not backported in upstream luminous - https://tracker.ceph.com/issues/39696. Then I tested this with RHCS 3.3 current build - 12.2.12-40.el7cp and it is working fine with RHCS 3.3(12.2.12) rebase. In fact, it is working fine in 12.2.10 upstream so some fix came in between 12.2.8 to 12.2.10. $ aws s3api get-bucket-location --bucket mybucket1 --endpoint-url http://10.8.129.236:8080 { "LocationConstraint": "us" } $ aws s3api get-bucket-location --bucket mybuc --endpoint-url http://10.8.129.236:8080 An error occurred (NoSuchBucket) when calling the GetBucketLocation operation: Unknown I think we should be able to close this one as RHCS 3.3 CURRENTRELEASE. Thank you, Vikhyat Hi Matt, RHCS 3.3 , ceph version - 12.2.12-40.el7cp I tried this on my setup, on a versioned bucket. While having a bucket present it shows HTTPStatusCode: 200 , and while changing the bucket name to a no existent bucket , it throws an error with "botocore.errorfactory.NoSuchBucket". Can check the outputs below that i got. -------------------------------------------------------------------- ---> non-existing bucket [root@magna107 ~]# cat 3bg.py import boto3 access_key = '12345' secret_key = '67890' s3_production = boto3.client('s3', endpoint_url='http://magna107:80', aws_access_key_id = access_key, aws_secret_access_key = secret_key ) print(s3_production.get_bucket_location(Bucket='my-bucket')) ------------------------------------------------------------------------ ---> output [root@magna107 ~]# python2 3bg.py Traceback (most recent call last): File "3bg.py", line 10, in <module> print(s3_production.get_bucket_location(Bucket='my-bucket')) File "/usr/lib/python2.7/site-packages/botocore/client.py", line 357, in _api_call return self._make_api_call(operation_name, kwargs) File "/usr/lib/python2.7/site-packages/botocore/client.py", line 661, in _make_api_call raise error_class(parsed_response, operation_name) botocore.errorfactory.NoSuchBucket: An error occurred (NoSuchBucket) when calling the GetBucketLocation operation: Unknown ----------------------------------------------------------------------------- ---> if the bucket name is changed to an existing bucket.. {'LocationConstraint': None, 'ResponseMetadata': {'HTTPStatusCode': 200, 'RetryAttempts': 0, 'HostId': '', 'RequestId': 'tx00000000000000000002c-005d48188b-a71cf-default', 'HTTPHeaders': {'date': 'Mon, 05 Aug 2019 11:52:43 GMT', 'content-length': '127', 'x-amz-request-id': 'tx00000000000000000002c-005d48188b-a71cf-default'}}} -------------------------------------------------------------------------------- Let me know if you need some more details. Rudra 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/RHSA-2019:2538 |