Project

General

Profile

Actions

Bug #53181

closed

rgw: wrong UploadPartCopy error code when src object not exist and src bucket not exist

Added by joke lee over 2 years ago. Updated 6 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
% Done:

100%

Source:
Tags:
multipart copy backport_processed
Backport:
octopus pacific
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

  1. coding: utf-8
    from boto3.session import Session
    import boto3
    import logging
    boto3.set_stream_logger('', logging.DEBUG)
    access_key = ''
    secret_key = ''
    host = "s3.amazonaws.com"
    url = "http://s3.amazonaws.com"
    session = Session(access_key, secret_key)
    config = boto3.session.Config(connect_timeout=30000, read_timeout=30000, retries={'max_attempts': 0}, signature_version="s3")
    s3_client = session.client('s3', endpoint_url=url, config=config)
    dst_bucket = "destbucket"
    dst_obj = 'destobject'
    src_bucket = "srcbucketnotexist"
    src_obj = 'srcobjectnotexist'
    mpu = s3_client.create_multipart_upload(Bucket=dst_bucket, Key=dst_obj)
    res = s3_client.upload_part_copy(Bucket=dst_bucket, CopySource=src_bucket+"/"+src_obj,
    Key=dst_obj,
    PartNumber=1, UploadId=mpu["UploadId"])

when src bucket not exist, it should return -ERR_NO_SUCH_BUCKET rather than -ENOENT
when src object not exist, it should return -ENOENT rather than -ACCESS


Related issues 2 (0 open2 closed)

Copied to Ceph - Backport #53657: octopus: rgw: wrong UploadPartCopy error code when src object not exist and src bucket not exist RejectedActions
Copied to Ceph - Backport #53658: pacific: rgw: wrong UploadPartCopy error code when src object not exist and src bucket not exist ResolvedKonstantin ShalyginActions
Actions

Also available in: Atom PDF