Project

General

Profile

Actions

Bug #39622

closed

rgw:RGWGetBucketVersioning on non-existing bucket does not return NoSuchBucket (http=404)

Added by Prashant D almost 5 years ago. Updated almost 5 years ago.

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

0%

Source:
Tags:
Backport:
mimic, luminous, nautilus
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
rgw
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

The issue is reproducible with downstream luminous and should be reproducible with master branch as well.

Steps to reproduce:
1. Get available buckets
$ python s3.list_bucket.py
Bucket List: ['bbq', 'my-av-bucket', 's3bucket']

-------------------------
s3.list_bucket.py
-------------------------
#!/usr/bin/python

import boto3
access_key = 's3user'
secret_key = 's3user'
s3 = boto3.client('s3', endpoint_url='http://rgw.default.abc.xyz.com:8080')
response = s3.list_buckets()
buckets = [bucket['Name'] for bucket in response['Buckets']]
print("Bucket List: %s" % buckets)
-------------------------

2. try to get bucket version for non-existing bucket
$ python s3.bucket_version.py {'ResponseMetadata': {'HTTPStatusCode': 200, 'RetryAttempts': 0, 'HostId': '', 'RequestId': 'tx000000000000000000063-005cd23c32-fac4-us-east', 'HTTPHeaders': {'date': 'Wed, 08 May 2019 02:17:22 GMT', 'content-length': '137', 'x-amz-request-id': 'tx000000000000000000063-005cd23c32-fac4-us-east', 'content-type': 'application/xml'}}}

---------------------------
s3.bucket_version.py
---------------------------
#!/usr/bin/python

import boto3
access_key = 's3user'
secret_key = 's3user'
  1. Create an S3 client
    s3 = boto3.client('s3', endpoint_url='http://rgw.default.abc.xyz.com:8080')

print(s3.get_bucket_versioning(Bucket='BUCKET'))
---------------------------

Actual results: {'ResponseMetadata': {'HTTPStatusCode': 200, 'RetryAttempts': 0, 'HostId': '', 'RequestId': 'tx000000000000000000063-005cd23c32-fac4-us-east', 'HTTPHeaders': {'date': 'Wed, 08 May 2019 02:17:22 GMT', 'content-length': '137', 'x-amz-request-id': 'tx000000000000000000063-005cd23c32-fac4-us-east', 'content-type': 'application/xml'}}}

Expected results:
botocore.errorfactory.NoSuchBucket: An error occurred (NoSuchBucket) when calling the GetBucketVersioning operation: Unknown


Related issues 1 (0 open1 closed)

Is duplicate of rgw - Bug #38420: rgw: success returned for put bucket versioning on a non existant bucketResolvedAbhishek Lekshmanan

Actions
Actions

Also available in: Atom PDF