Project

General

Profile

Bug #36265

rgw: list bucket can not show the object uploaded by RGWPostObj when enable bucket versioning

Added by joke lee about 2 months ago. Updated 18 days ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
09/30/2018
Due date:
% Done:

0%

Source:
Tags:
Backport:
mimic, luminous
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:

Description

when bucket enable versioning and we upload object by post object

the post object script
```
#!/usr/bin/python
from boto3.session import Session
import boto3
import botocore
botocore.session.Session().set_debug_logger()
bucketname = 'test2'
objectname = 'prefix/keyv6'
access_key = "yly"
secret_key = "yly"
url = "http://127.0.0.1:7484"

session = Session(access_key, secret_key)
s3_client = session.client(
's3',
endpoint_url=url,
use_ssl = False,
)
#import ipdb; ipdb.set_trace() # BREAKPOINT

conditions = [
["starts-with", "$Content-Type", "image/"],
["starts-with", "$key", "prefix/"],
["content-length-range", 0, 20000000],
]
form_data = s3_client.generate_presigned_post(
Conditions = conditions,
Bucket = bucketname,
Key=objectname
)

form_data["fields"]['Content-Type'] = 'image/png'
form_data["fields"]['key'] = objectname
files = {"file": open('5M','rb')}

import requests
import logging
from requests_toolbelt.utils import dump
logging.basicConfig(level=logging.DEBUG)

response = requests.post(form_data["url"], data=form_data["fields"], files=files)
data = dump.dump_all(response)
print(data.decode('utf-8'))
```

after upload ,we can not see the object by
```
s3cmd ls s3://test2
```


Related issues

Copied to rgw - Backport #36423: luminous: rgw: list bucket can not show the object uploaded by RGWPostObj when enable bucket versioning Resolved
Copied to rgw - Backport #36424: mimic:rgw: list bucket can not show the object uploaded by RGWPostObj when enable bucket versioning Resolved

History

#2 Updated by Casey Bodley about 1 month ago

  • Status changed from New to Testing

#3 Updated by Nathan Cutler about 1 month ago

  • Status changed from Testing to Pending Backport
  • Backport set to mimic, luminous

#6 Updated by Nathan Cutler about 1 month ago

  • Copied to Backport #36423: luminous: rgw: list bucket can not show the object uploaded by RGWPostObj when enable bucket versioning added

#7 Updated by Nathan Cutler about 1 month ago

  • Copied to Backport #36424: mimic:rgw: list bucket can not show the object uploaded by RGWPostObj when enable bucket versioning added

#8 Updated by Nathan Cutler 18 days ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF