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

kraken: rgw: multisite: rest api fails to decode large period on 'period commit' #16161

Merged
merged 6 commits into from Jul 19, 2017

Conversation

@smithfarm smithfarm self-assigned this Jul 6, 2017
@smithfarm smithfarm added this to the kraken milestone Jul 6, 2017
@smithfarm
Copy link
Contributor Author

/home/jenkins-build/build/workspace/ceph-pull-requests/src/rgw/rgw_rest_realm.cc: In member function ‘virtual void RGWOp_Period_Post::execute()’:
/home/jenkins-build/build/workspace/ceph-pull-requests/src/rgw/rgw_rest_realm.cc:87:37: error: ‘struct md_config_t’ has no member named ‘rgw_max_put_param_size’
   const auto max_size = cct->_conf->rgw_max_put_param_size;
                                     ^

theanalyst and others added 6 commits July 6, 2017 20:08
We currently read all user input for a few apis accepting xml, avoid
doing this and error out early, most s3 apis limit to about 1000 xml
entries, make this configurable via a new config param,
`rgw_max_put_param_size` defaulting to 1MB. Also modified
`rgw_rest_read_all_input` with an additional param to not allow for
chunked uploads, though we error out in a better way by responding with
content length required rather than S3's 501 if chunked is set.

This also adds the same behavior in RGWPutCORS reusing
`rgw_rest_read_all_input`, and using a data_deleter to manage the char*

Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>

rgw: rgw_rest_s3: make PUT CORS accept only a configured max input

Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
(cherry picked from commit 35375b7)
testing with 3 zonegroups and 3 zones each, the period json grew larger
than 4k and caused decode failures on period commit

updated to use the new config variable rgw_max_put_param_size

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

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 7f2871f)
if no zonegroup endpoints are set, fall back to master zone endpoints

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

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 92f63c6)
local dest_url variable was shadowing the one in the enclosing scope, so
the changes were not applied and no Location header was written on redirect

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

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 542e188)
Fixes: http://tracker.ceph.com/issues/19746

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 8a459c7)
Fixes: http://tracker.ceph.com/issues/20244

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit b8272f3)
@smithfarm
Copy link
Contributor Author

@oritwas @cbodley This passed a rgw suite at http://tracker.ceph.com/issues/19009#note-65 with two valgrind-related failures that I'm currently re-running.

Please review.

@smithfarm
Copy link
Contributor Author

@yehudasa This passed a rgw suite at http://tracker.ceph.com/issues/19009#note-65 with two valgrind-related failures that I'm currently re-running.

Please review.

@smithfarm smithfarm requested a review from yehudasa July 18, 2017 21:02
@smithfarm smithfarm merged commit 872a8b5 into ceph:kraken Jul 19, 2017
@smithfarm smithfarm deleted the wip-19614-kraken branch July 19, 2017 13:25
@smithfarm smithfarm changed the title kraken: multisite: rest api fails to decode large period on 'period commit' kraken: rgw: multisite: rest api fails to decode large period on 'period commit' Jul 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants