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

mimic: rgw: default quota not set in radosgw for Openstack users #24907

Merged
merged 3 commits into from Nov 20, 2018

Conversation

Projects
None yet
3 participants
@smithfarm
Copy link
Contributor

smithfarm commented Nov 3, 2018

@smithfarm smithfarm added this to the mimic milestone Nov 3, 2018

@smithfarm smithfarm added the rgw label Nov 3, 2018

@smithfarm smithfarm requested review from cbodley and mattbenjamin Nov 3, 2018

@cbodley

cbodley approved these changes Nov 5, 2018

@smithfarm

This comment has been minimized.

Copy link
Contributor

smithfarm commented Nov 11, 2018

Jenkins re-test this please

@cbodley
Copy link
Contributor

cbodley left a comment

oops, conflicts with the config changes

@@ -16,6 +16,7 @@
#define CEPH_RGW_QUOTA_H

#include "include/utime.h"
#include "common/config_fwd.h"

This comment has been minimized.

@cbodley

cbodley Nov 12, 2018

Contributor

common/config.h

@@ -114,4 +115,8 @@ class RGWQuotaHandler {
static void free_handler(RGWQuotaHandler *handler);
};

// apply default quotas from configuration
void rgw_apply_default_bucket_quota(RGWQuotaInfo& quota, const ConfigProxy& conf);
void rgw_apply_default_user_quota(RGWQuotaInfo& quota, const ConfigProxy& conf);

This comment has been minimized.

@cbodley

cbodley Nov 12, 2018

Contributor

ConfigProxy -> md_config_t

rgw: remove redundant quota logic from admin/user api
RGWOp_User_Create was applying the configured default quotas to the
RGWUserAdminOpState, but RGWUser::execute_add() will already apply those
defaults when the AdminOpState doesn't provide them

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 3a252bb)

@smithfarm smithfarm force-pushed the smithfarm:wip-36223-mimic branch 2 times, most recently from 3466826 to 11bea48 Nov 12, 2018

@smithfarm

This comment has been minimized.

Copy link
Contributor

smithfarm commented Nov 13, 2018

/home/jenkins-build/build/workspace/ceph-pull-requests/src/rgw/rgw_quota.cc: In function 'void rgw_apply_default_bucket_quota(RGWQuotaInfo&, const md_config_t&)':
/home/jenkins-build/build/workspace/ceph-pull-requests/src/rgw/rgw_quota.cc:1011:11: error: base operand of '->' has non-pointer type 'const md_config_t'
   if (conf->rgw_bucket_default_quota_max_objects >= 0) {
           ^~
/home/jenkins-build/build/workspace/ceph-pull-requests/src/rgw/rgw_quota.cc:1012:29: error: base operand of '->' has non-pointer type 'const md_config_t'
     quota.max_objects = conf->rgw_bucket_default_quota_max_objects;
                             ^~
/home/jenkins-build/build/workspace/ceph-pull-requests/src/rgw/rgw_quota.cc:1015:11: error: base operand of '->' has non-pointer type 'const md_config_t'
   if (conf->rgw_bucket_default_quota_max_size >= 0) {
           ^~
/home/jenkins-build/build/workspace/ceph-pull-requests/src/rgw/rgw_quota.cc:1016:26: error: base operand of '->' has non-pointer type 'const md_config_t'
     quota.max_size = conf->rgw_bucket_default_quota_max_size;
                          ^~
/home/jenkins-build/build/workspace/ceph-pull-requests/src/rgw/rgw_quota.cc: In function 'void rgw_apply_default_user_quota(RGWQuotaInfo&, const md_config_t&)':
/home/jenkins-build/build/workspace/ceph-pull-requests/src/rgw/rgw_quota.cc:1023:11: error: base operand of '->' has non-pointer type 'const md_config_t'
   if (conf->rgw_user_default_quota_max_objects >= 0) {
           ^~
/home/jenkins-build/build/workspace/ceph-pull-requests/src/rgw/rgw_quota.cc:1024:29: error: base operand of '->' has non-pointer type 'const md_config_t'
     quota.max_objects = conf->rgw_user_default_quota_max_objects;
                             ^~
/home/jenkins-build/build/workspace/ceph-pull-requests/src/rgw/rgw_quota.cc:1027:11: error: base operand of '->' has non-pointer type 'const md_config_t'
   if (conf->rgw_user_default_quota_max_size >= 0) {
           ^~
/home/jenkins-build/build/workspace/ceph-pull-requests/src/rgw/rgw_quota.cc:1028:26: error: base operand of '->' has non-pointer type 'const md_config_t'
     quota.max_size = conf->rgw_user_default_quota_max_size;
                          ^~
src/rgw/CMakeFiles/rgw_a.dir/build.make:1410: recipe for target 'src/rgw/CMakeFiles/rgw_a.dir/rgw_quota.cc.o' failed

cbodley added some commits Sep 19, 2018

rgw: add helper functions to apply configured default quotas
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit ba83d0c)

Conflicts:
    src/rgw/rgw_quota.cc
    src/rgw/rgw_quota.h
- mimic uses "md_config_t" (non-pointer) instead of "ConfigProxy"
(pointer)
rgw: RemoteApplier::create_account() applies default quota config
rgw users created to shadow users from external auth were missing the
logic to apply their default quota settings

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

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit abb81b4)

@smithfarm smithfarm force-pushed the smithfarm:wip-36223-mimic branch from 11bea48 to f2779e5 Nov 13, 2018

@cbodley

This comment has been minimized.

Copy link
Contributor

cbodley commented Nov 13, 2018

looks good, thanks @smithfarm!

@yuriw

This comment has been minimized.

Copy link
Contributor

yuriw commented Nov 19, 2018

@yuriw yuriw merged commit 7762fee into ceph:mimic Nov 20, 2018

4 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

@smithfarm smithfarm deleted the smithfarm:wip-36223-mimic branch Nov 20, 2018

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