Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rgw: add xml output header in RGWCopyObj_ObjStore_S3 response msg #19475

Merged
merged 1 commit into from Jan 8, 2018

Conversation

Projects
None yet
5 participants
@ZVampirEM77
Copy link
Contributor

commented Dec 13, 2017

Fixes: http://tracker.ceph.com/issues/22416

When move object by s3cmd mv, s3cmd will do four things:

  • get source object acl
  • copy source object from source bucket to destination bucket and destination object
  • put acl for destination object
  • delete source object in source bucket

But in RGW now, the s3cmd mv will put a new object in destination bucket without deleting the
source 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

rgw: add xml output header in RGWCopyObj_ObjStore_S3 response msg
Fixes: http://tracker.ceph.com/issues/22416

Signed-off-by: Enming Zhang <enming.zhang@umcloud.com>
@ZVampirEM77

This comment has been minimized.

Copy link
Contributor Author

commented Dec 13, 2017

Jenkins, retest this please.

1 similar comment
@ZVampirEM77

This comment has been minimized.

Copy link
Contributor Author

commented Dec 16, 2017

Jenkins, retest this please.

@ZVampirEM77

This comment has been minimized.

Copy link
Contributor Author

commented Dec 18, 2017

@cbodley
Copy link
Contributor

left a comment

thanks for the detailed analysis! that makes review so much easier 👍

@scienceluo
Copy link
Contributor

left a comment

LGTM.
Good Job,Enming Bro.

@yuriw

This comment has been minimized.

Copy link
Contributor

commented Jan 2, 2018

@yuriw yuriw merged commit 585ffbe into ceph:master Jan 8, 2018

5 checks passed

Docs: build check OK - docs built
Details
Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
make check make check succeeded
Details
make check (arm64) make check succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.