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-multisite: fix the problem of rgw website configure request not redirect to metadata master #15082

Merged
merged 1 commit into from Jun 15, 2017

Conversation

Projects
None yet
3 participants
@joke-lee
Contributor

joke-lee commented May 15, 2017

hi, when i make website configure request to slave zone rgw, and get website configure from master zone,but i can not get the website configure from master zone, and this pull fix the problem.

Signed-off-by: yuliyang yuliyang@cmss.chinamobile.com

if (!store->is_meta_master()) {
op_ret = forward_request_to_master(s, NULL, store, in_data, nullptr);
if (op_ret < 0) {
ldout(s->cct, 20) << __func__ << "forward_request_to_master returned ret=" << op_ret << dendl;

This comment has been minimized.

@tchaikov

tchaikov May 15, 2017

Contributor

add a space before forward_request_to_master.

@tchaikov tchaikov added the rgw label May 15, 2017

@joke-lee joke-lee changed the title from fix the problem of rgw website configure request not redirect to metadata master to rgw-multisite: fix the problem of rgw website configure request not redirect to metadata master May 15, 2017

@joke-lee

This comment has been minimized.

Contributor

joke-lee commented May 31, 2017

@tchaikov How about progress about this review ?

@tchaikov

This comment has been minimized.

Contributor

tchaikov commented May 31, 2017

@joke-lee i am not familiar with this area. so you might need to ping experts in rgw to get your PR reviewed. i'd recommend you "@" them in the comments in this PR to get their attention.

@cbodley cbodley self-assigned this May 31, 2017

@joke-lee

This comment has been minimized.

Contributor

joke-lee commented May 31, 2017

@cbodley hi, can you help to review this?

@joke-lee

This comment has been minimized.

Contributor

joke-lee commented May 31, 2017

@yehudasa hi, can you help to review this?

@joke-lee

This comment has been minimized.

Contributor

joke-lee commented May 31, 2017

@liewegas hi, can you help to review this?

@cbodley

This comment has been minimized.

Contributor

cbodley commented May 31, 2017

thanks @joke-lee. can you please add a test_set_bucket_website() test case to src/test/rgw/rgw_multi/tests.py? you can see a very similar example in #15260

@joke-lee

This comment has been minimized.

Contributor

joke-lee commented Jun 14, 2017

@cbodley add test case test_set_bucket_website done, do you mind to review it ?

@cbodley cbodley removed the needs-test label Jun 14, 2017

@cbodley

This comment has been minimized.

Contributor

cbodley commented Jun 14, 2017

@joke-lee thanks for adding the test. i didn't realize that this depended on rgw_enable_static_website being set in ceph.conf. with that set, i see the test passing 👍 but in a default configuration, i see set_website_configuration() failing with MethodNotAllowed - so let's detect that and skip the test. this worked for me:

-        bucket.set_website_configuration(website_cfg)
+        try:
+            bucket.set_website_configuration(website_cfg)
+        except boto.exception.S3ResponseError as e:
+            if e.error_code == 'MethodNotAllowed':
+                raise SkipTest("test_set_bucket_website skipped. Requires rgw_enable_static_website = 1.")
+            raise
         assert(bucket.get_website_configuration_with_xml()[1] == website_cfg.to_xml())
rgw-multisite: fix the problem of rgw website configure request not r…
…edirect to metadata master

Signed-off-by: yuliyang <yuliyang@cmss.chinamobile.com>
@joke-lee

This comment has been minimized.

Contributor

joke-lee commented Jun 15, 2017

hi @cbodley ,i have update test case in src/test/rgw/rgw_multi/tests.py ,do you mind to help review it?

@joke-lee

This comment has been minimized.

Contributor

joke-lee commented Jun 15, 2017

retest this please.

@cbodley cbodley merged commit 967ceae into ceph:master Jun 15, 2017

4 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
arm64 make check arm64 make check succeeded
Details
make check make check succeeded
Details

@joke-lee joke-lee deleted the joke-lee:fix-website-redirect-request-to-master branch Jun 15, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment