rgw: add xml output header in RGWCopyObj_ObjStore_S3 response msg #19475
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes: http://tracker.ceph.com/issues/22416
When move object by
s3cmd mv
, s3cmd will do four things:But in RGW now, the
s3cmd mv
will put a new object in destination bucket without deleting thesource object in source bucket, this is not same with S3, eg:
s3cmd ls s3://bucket1
2017-12-13 04:04 1871 s3://bucket1/obj1
2017-12-13 04:04 8034 s3://bucket1/obj2
s3cmd mv s3://bucket1/obj1 s3://bucket1/obj3
move: 's3://bucket1/obj1' -> 's3://bucket1/obj3'
s3cmd ls s3://bucket1
2017-12-13 04:04 1871 s3://bucket1/obj1
2017-12-13 04:04 8034 s3://bucket1/obj2
2017-12-13 07:06 1871 s3://bucket1/obj3
By reading source code of s3cmd, I found s3cmd would parse the
data
field in response msg which should contain<?xml version="1.0" encoding="UTF-8"?>
to decide whether send delete object request or not.So now, the result is:
s3cmd ls s3://bucket1
2017-12-13 04:04 1871 s3://bucket1/obj1
2017-12-13 04:04 8034 s3://bucket1/obj2
s3cmd mv s3://bucket1/obj1 s3://bucket1/obj3
move: 's3://bucket1/obj1' -> 's3://bucket1/obj3'
s3cmd ls s3://bucket1
2017-12-13 04:04 8034 s3://bucket1/obj2
2017-12-13 07:06 1871 s3://bucket1/obj3
Signed-off-by: Enming Zhang enming.zhang@umcloud.com