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: drop the unnecessary handling of Swift's X-Storage-Policy on objects #16383

Merged
merged 1 commit into from Jan 9, 2018

Conversation

Projects
None yet
6 participants
@mikulely
Copy link
Contributor

commented Jul 18, 2017

We need to check this as we do in RGWPutMetadataBucket::execute

Signed-off-by: Jiaying Ren jiaying.ren@umcloud.com

@mikulely mikulely force-pushed the mikulely:1-ban-change-swift-obj-placement branch 2 times, most recently from 2be7b6f to 2326e8a Jul 18, 2017

@mikulely mikulely changed the title rgw: swift shouldn't change obj storage policy during change obj meta rgw: fix swift shouldn't change obj storage policy during change obj meta Jul 18, 2017

@@ -1193,7 +1193,7 @@ class RGWPutMetadataBucket : public RGWOp {
class RGWPutMetadataObject : public RGWOp {
protected:
RGWAccessControlPolicy policy;
string placement_rule;
std::string requested_placement_id;

This comment has been minimized.

Copy link
@rzarzynski

rzarzynski Jul 18, 2017

Contributor

Thanks for the std prefix in headers!

@@ -3997,6 +3997,13 @@ void RGWPutMetadataObject::execute()
}

rgw_get_request_metadata(s->cct, s->info, attrs);

if (!requested_placement_id.empty() &&

This comment has been minimized.

Copy link
@rzarzynski

rzarzynski Jul 18, 2017

Contributor

Hmm, I'm not 100% sure we really need to handle X-Storage-Policy on objects. In the related SwiftStack's documentation we can find:

Swift clients select the Storage Policy that will be used when storing object data under a container's namespace when they create the container. All object data stored under a container's namespace will be placed according the configuration of the Storage Policy which was set when the container was created.

In the Swift object server's code base I don't see any traces of the handling. What does Swift do when different X-Storage-Policy is seen in POST on object?

This comment has been minimized.

Copy link
@mikulely

mikulely Jul 19, 2017

Author Contributor

Swift will ignore the X-Storage-Policy param silently:

$ curl -X POST -i -H 'X-Auth-Token: AUTH_tk4eb4bd197c0a405094661363f89eb409' -H 'X-Storage-Policy: Policy-0' http://127.0.0.1:32768/v1/AUTH_test/em-container/em-obj777
HTTP/1.1 202 Accepted
Content-Length: 76
Content-Type: text/html; charset=UTF-8
X-Trans-Id: tx7f1d820c0f3c4a6f82e95-00596f3104
X-Openstack-Request-Id: tx7f1d820c0f3c4a6f82e95-00596f3104
Date: Wed, 19 Jul 2017 10:14:28 GMT

<html><h1>Accepted</h1><p>The request is accepted for processing.</p ></html>

$ curl -X HEAD -i -H 'X-Auth-Token: AUTH_tk4eb4bd197c0a405094661363f89eb409' http://127.0.0.1:32768/v1/AUTH_test/em-container/em-obj777
HTTP/1.1 200 OK
Content-Length: 914
Accept-Ranges: bytes
Last-Modified: Wed, 19 Jul 2017 10:14:29 GMT
Etag: 643771dd0cd85b012011aa8bca26e62e
X-Timestamp: 1500459268.65024
Content-Type: text/xml
X-Trans-Id: txb59eb9441aa04a0ab3117-00596f3109
X-Openstack-Request-Id: txb59eb9441aa04a0ab3117-00596f3109
Date: Wed, 19 Jul 2017 10:14:33 GMT

@mikulely mikulely force-pushed the mikulely:1-ban-change-swift-obj-placement branch from 2326e8a to b5ce1cc Jul 19, 2017

@mikulely

This comment has been minimized.

Copy link
Contributor Author

commented Jul 19, 2017

@rzarzynski In order to 100% compatible with Swift, we can just ignore this param. What do you think?

rgw: swift ignore obj storage policy during change obj meta
Signed-off-by: Jiaying Ren <jiaying.ren@umcloud.com>

@mikulely mikulely force-pushed the mikulely:1-ban-change-swift-obj-placement branch from b5ce1cc to 62fb93a Jul 19, 2017

@rzarzynski rzarzynski added cleanup and removed bug fix labels Jul 19, 2017

@rzarzynski

This comment has been minimized.

Copy link
Contributor

commented Jul 19, 2017

@mikulely: yup, we should ignore the header.

@rzarzynski rzarzynski changed the title rgw: fix swift shouldn't change obj storage policy during change obj meta rgw: drop the unnecessary handling of Swift's X-Storage-Policy on objects Jul 19, 2017

@ceph-jenkins

This comment has been minimized.

Copy link
Collaborator

commented Jul 19, 2017

make check failed

@rzarzynski

This comment has been minimized.

Copy link
Contributor

commented Jul 19, 2017

jenkins retest this please

@mikulely

This comment has been minimized.

Copy link
Contributor Author

commented Sep 15, 2017

Jenkins, retest this please.

@mikulely

This comment has been minimized.

Copy link
Contributor Author

commented Oct 16, 2017

@rzarzynski @joscollin mind to merge?

@joscollin

This comment has been minimized.

Copy link
Member

commented Oct 16, 2017

@mikulely I will let the reviewer @rzarzynski to go ahead with this PR.

@rzarzynski
Copy link
Contributor

left a comment

LGTM.

@yuriw

This comment has been minimized.

Copy link
Contributor

commented Jan 8, 2018

@yuriw yuriw merged commit ad3502f into ceph:master Jan 9, 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

@mikulely mikulely deleted the mikulely:1-ban-change-swift-obj-placement branch Jan 10, 2018

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.