Bug 1705922
Summary: | Getting versioning state of non-existing bucket returns HTTP Response 200 | ||
---|---|---|---|
Product: | [Red Hat Storage] Red Hat Ceph Storage | Reporter: | Manjunatha <mmanjuna> |
Component: | RGW | Assignee: | shilpa <smanjara> |
Status: | CLOSED ERRATA | QA Contact: | RUDRA PRATAP <rpratap> |
Severity: | medium | Docs Contact: | Aron Gunn <agunn> |
Priority: | medium | ||
Version: | 3.2 | CC: | agunn, cbodley, ceph-eng-bugs, kbader, mbenjamin, pdhange, rpratap, smanjara, sweil, tchandra, tserlin, vumrao |
Target Milestone: | rc | ||
Target Release: | 3.3 | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | RHEL: ceph-12.2.12-31.el7cp Ubuntu: ceph_12.2.12-27redhat1 | Doc Type: | Bug Fix |
Doc Text: |
.Getting the versioning state on a nonexistent bucket now returns an error
Previously, when getting the bucket version on a nonexistent bucket, the HTTP response was successful, for example:
`'HTTPStatusCode': 200`
Because the bucket does not exist, the correct HTTP response must be an error. With this release, when getting the bucket version on a nonexistent bucket, the Ceph Object Gateway code returns the following error:
`ERR_NO_SUCH_BUCKET`
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2019-08-21 15:10:58 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: | 1726135 |
Comment 5
shilpa
2019-05-27 09:55:06 UTC
Thanks Manjunath. https://github.com/ceph/ceph/pull/26569 will be backported to address this BZ. Hi, In my test environment, (CEPH V 3.3) , the bucket is versioned.. --------------------------------------------------------------------------------------------- --->[root@magna107 ~]# radosgw-admin bucket list [ "my-new-bucket" ] ----------------------------------------------------------------------------------------------- --->[root@magna107 ~]# cat 2-1bg.py import boto3 access_key = '12345' secret_key = '67890' s3_production = boto3.client('s3', endpoint_url='http://magna107', aws_access_key_id = access_key, aws_secret_access_key = secret_key ) print(s3_production.get_bucket_versioning(Bucket='my-new-bucket')) ----------------------------------------------------------------------------------------------------- --->[root@magna107 ~]# python2 2-1bg.py {u'Status': 'Enabled', 'ResponseMetadata': {'HTTPStatusCode': 200, 'RetryAttempts': 0, 'HostId': '', 'RequestId': 'tx000000000000000000026-005d4808ea-a71cf-default', 'HTTPHeaders': {'date': 'Mon, 05 Aug 2019 10:46:02 GMT', 'content-length': '161', 'x-amz-request-id': 'tx000000000000000000026-005d4808ea-a71cf-default', 'content-type': 'application/xml'}}} --------------------------------------------------------------------------------------------------------------------------------------------------------- ---> if bucket name is changed to my-bucket... --->[root@magna107 ~]# cat 2-1bg.py import boto3 access_key = '12345' secret_key = '67890' s3_production = boto3.client('s3', endpoint_url='http://magna107', aws_access_key_id = access_key, aws_secret_access_key = secret_key ) print(s3_production.get_bucket_versioning(Bucket='my-bucket')) -------------------------------------------------------------------------------------------------------------------------- --->[root@magna107 ~]# python2 2-1bg.py Traceback (most recent call last): File "2-1bg.py", line 10, in <module> print(s3_production.get_bucket_versioning(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 GetBucketVersioning operation: Unknown ------------------------------------------------------------------------------------------------------------------------------ Let me know if u need more details. Rudra *** Bug 1688931 has been marked as a duplicate of this bug. *** 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 |