From abb81b4fb5898d7cf39c86dc40d3b488717978c9 Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Wed, 19 Sep 2018 09:39:39 -0400 Subject: [PATCH] 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 --- src/rgw/rgw_auth.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/rgw/rgw_auth.cc b/src/rgw/rgw_auth.cc index d9c4e64ca86c8..b50b8b442d39e 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" @@ -404,6 +405,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->_conf); + rgw_apply_default_user_quota(user_info.user_quota, cct->_conf); + int ret = rgw_store_user_info(store, user_info, nullptr, nullptr, real_time(), true); if (ret < 0) { -- 2.39.5