Bug 1705922 - Getting versioning state of non-existing bucket returns HTTP Response 200
Summary: Getting versioning state of non-existing bucket returns HTTP Response 200
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat Storage
Component: RGW
Version: 3.2
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: 3.3
Assignee: shilpa
QA Contact: RUDRA PRATAP
Aron Gunn
URL:
Whiteboard:
: 1688931 (view as bug list)
Depends On:
Blocks: 1726135
TreeView+ depends on / blocked
 
Reported: 2019-05-03 08:42 UTC by Manjunatha
Modified: 2019-11-11 09:52 UTC (History)
12 users (show)

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`
Clone Of:
Environment:
Last Closed: 2019-08-21 15:10:58 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Ceph Project Bug Tracker 38420 0 None None None 2019-05-28 03:57:41 UTC
Github ceph ceph pull 26569 0 'None' closed rgw: return ERR_NO_SUCH_BUCKET early while evaluating bucket policy 2020-09-10 07:10:47 UTC
Red Hat Product Errata RHSA-2019:2538 0 None None None 2019-08-21 15:11:09 UTC

Comment 5 shilpa 2019-05-27 09:55:06 UTC
Hi Manjunath,

Can you find out what specific version of ceph is the customer running?

Comment 7 shilpa 2019-05-28 03:45:16 UTC
Thanks Manjunath.

https://github.com/ceph/ceph/pull/26569 will be backported to address this BZ.

Comment 17 RUDRA PRATAP 2019-08-05 11:03:59 UTC
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

Comment 18 Matt Benjamin (redhat) 2019-08-16 13:24:52 UTC
*** Bug 1688931 has been marked as a duplicate of this bug. ***

Comment 20 errata-xmlrpc 2019-08-21 15:10:58 UTC
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


Note You need to log in before you can comment on or make changes to this bug.