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: fix forward request for bulkupload to be applied in multisite #14601

Merged
merged 1 commit into from May 4, 2017

Conversation

Projects
None yet
3 participants
@Jing-Scott
Contributor

Jing-Scott commented Apr 18, 2017

@Jing-Scott

This comment has been minimized.

Contributor

Jing-Scott commented Apr 19, 2017

@rzarzynski @cbodley can you help to take a look? Thanks:)

@rzarzynski rzarzynski self-assigned this Apr 19, 2017

@@ -5580,6 +5580,18 @@ int RGWBulkUploadOp::handle_dir_verify_permission()
return 0;
}
void RGWBulkUploadOp::forward_req_info(req_info& info, std::string bucket_name)
{
if (info.script_uri.find(bucket_name) != std::string::npos) {

This comment has been minimized.

@cbodley

cbodley Apr 19, 2017

Contributor

in what cases would this already contain the bucket name? maybe add a comment here to clarify?

@@ -5580,6 +5580,18 @@ int RGWBulkUploadOp::handle_dir_verify_permission()
return 0;
}
void RGWBulkUploadOp::forward_req_info(req_info& info, std::string bucket_name)

This comment has been minimized.

@cbodley

cbodley Apr 19, 2017

Contributor

this doesn't need to be a member of RGWBulkUploadOp - can you change it to a static function (and add a CephContext *cct argument for the ldout)?

bucket_name should be passed as a const reference

rgw: fix forward request for bulkupload to be applied in multisite
fixes: http://tracker.ceph.com/issues/19645
Signed-off-by: Jing Wenjun <jingwenjun@cmss.chinamobile.com>
@Jing-Scott

This comment has been minimized.

Contributor

Jing-Scott commented Apr 23, 2017

@cbodley done!

@cbodley

This comment has been minimized.

Contributor

cbodley commented Apr 25, 2017

@rzarzynski can you help me figure out how to test this one?

@rzarzynski

@Jing-Scott: thanks for the patch. Below is my comment that is more about signalising a potential issue (an escape from language's type system) rather than requesting changes. I'm not 100% sure whether the problem occurs.

{
/* the request of container or object level will contain bucket name.
* only at account level need to append the bucket name */
if (info.script_uri.find(bucket_name) != std::string::npos) {

This comment has been minimized.

@rzarzynski

rzarzynski Apr 26, 2017

Contributor

Hmm, we might have an issue with url encoding here. req_info::script_uri stays url encoded while bucket_name might be not. Maybe url_encode it?

@rzarzynski

This comment has been minimized.

Contributor

rzarzynski commented Apr 26, 2017

can you help me figure out how to test this one?

@cbodley: we would need two things:

  1. operational multi-site deployment,
  2. uncompressed TAR archive for bulk upload.

@Jing-Scott provided curl examples in PR #14775.

@cbodley cbodley self-assigned this Apr 26, 2017

@cbodley

This comment has been minimized.

Contributor

cbodley commented Apr 28, 2017

tested a bulk upload to a secondary zone, and verified that the create_bucket requests were correctly forwarded and processed on the master zone 👍

@cbodley cbodley removed their assignment Apr 28, 2017

@rzarzynski

This comment has been minimized.

Contributor

rzarzynski commented May 1, 2017

This branch has been tested in following Teuthology runs:

The results look good. The failures have been caused by the well-known strange leak of std::string memory from md_config_t seen in radosgw signalised by Valgrind by Valgrind signalising a non-related leak outside of RadosGW (mons).

@cbodley

cbodley approved these changes May 4, 2017

@cbodley cbodley merged commit 9ddbcfd into ceph:master May 4, 2017

4 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
arm build successfully built on arm
Details
default Build finished.
Details

@Jing-Scott Jing-Scott deleted the Jing-Scott:fix-bulkupload-multisite branch May 5, 2017

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