From: Casey Bodley Date: Wed, 19 Sep 2018 13:39:39 +0000 (-0400) Subject: rgw: RemoteApplier::create_account() applies default quota config X-Git-Tag: v12.2.11~116^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8cebe8887477489e71684da72512a63e4107753b;p=ceph.git 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 (cherry picked from commit abb81b4fb5898d7cf39c86dc40d3b488717978c9) Signed-off-by: Matt Benjamin --- diff --git a/src/rgw/rgw_auth.cc b/src/rgw/rgw_auth.cc index e18749060fef7..1073ba1ed20dd 100644 --- a/src/rgw/rgw_auth.cc +++ b/src/rgw/rgw_auth.cc @@ -5,6 +5,7 @@ #include "rgw_common.h" #include "rgw_auth.h" +#include "rgw_quota.h" #include "rgw_user.h" #include "rgw_http_client.h" #include "rgw_keystone.h" @@ -444,6 +445,10 @@ void rgw::auth::RemoteApplier::create_account(const rgw_user& acct_user, user_info.user_id = new_acct_user; user_info.display_name = info.acct_name; + user_info.max_buckets = cct->_conf->rgw_user_max_buckets; + rgw_apply_default_bucket_quota(user_info.bucket_quota, cct); + rgw_apply_default_user_quota(user_info.user_quota, cct); + int ret = rgw_store_user_info(store, user_info, nullptr, nullptr, real_time(), true); if (ret < 0) {