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

Merged
merged 1 commit into from Jun 15, 2017
Merged

rgw-multisite: fix the problem of rgw website configure request not redirect to metadata master #15082

merged 1 commit into from Jun 15, 2017

Conversation

joke-lee
Copy link
Contributor

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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a space before forward_request_to_master.

@tchaikov tchaikov added the rgw label May 15, 2017
@joke-lee joke-lee changed the title fix the problem of rgw website configure request not redirect to metadata master rgw-multisite: fix the problem of rgw website configure request not redirect to metadata master May 15, 2017
@joke-lee
Copy link
Contributor Author

@tchaikov How about progress about this review ?

@tchaikov
Copy link
Contributor

@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
Copy link
Contributor Author

@cbodley hi, can you help to review this?

@joke-lee
Copy link
Contributor Author

@yehudasa hi, can you help to review this?

@joke-lee
Copy link
Contributor Author

@liewegas hi, can you help to review this?

@cbodley
Copy link
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
Copy link
Contributor Author

joke-lee commented Jun 14, 2017

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

@cbodley
Copy link
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())

…edirect to metadata master

Signed-off-by: yuliyang <yuliyang@cmss.chinamobile.com>
@joke-lee
Copy link
Contributor Author

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

@joke-lee
Copy link
Contributor Author

retest this please.

@cbodley cbodley merged commit 967ceae into ceph:master Jun 15, 2017
@joke-lee joke-lee deleted the fix-website-redirect-request-to-master branch June 15, 2017 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants