OPTION(rgw_multipart_min_part_size, OPT_INT, 5 * 1024 * 1024) // min size for each part (except for last one) in multipart upload
OPTION(rgw_olh_pending_timeout_sec, OPT_INT, 3600) // time until we retire a pending olh change
+OPTION(rgw_user_max_buckets, OPT_U32, 1000) // global option to set max buckets count for all user
OPTION(mutex_perf_counter, OPT_BOOL, false) // enable/disable mutex perf counter
OPTION(throttler_perf_counter, OPT_BOOL, true) // enable/disable throttler perf counter
cerr << " --access=<access> Set access permissions for sub-user, should be one\n";
cerr << " of read, write, readwrite, full\n";
cerr << " --display-name=<name>\n";
+ cerr << " --max_buckets max number of buckets for a user\n";
cerr << " --system set the system flag on the user\n";
cerr << " --bucket=<bucket>\n";
cerr << " --pool=<pool>\n";
bool exclusive;
uint32_t max_buckets;
+ uint32_t default_max_buckets = s->cct->_conf->rgw_user_max_buckets;
RGWUserAdminOpState op_state;
RESTArgs::get_string(s, "user-caps", caps, &caps);
RESTArgs::get_bool(s, "generate-key", true, &gen_key);
RESTArgs::get_bool(s, "suspended", false, &suspended);
- RESTArgs::get_uint32(s, "max-buckets", RGW_DEFAULT_MAX_BUCKETS, &max_buckets);
+ RESTArgs::get_uint32(s, "max-buckets", default_max_buckets, &max_buckets);
RESTArgs::get_bool(s, "system", false, &system);
RESTArgs::get_bool(s, "exclusive", false, &exclusive);
op_state.set_key_type(key_type);
}
- if (max_buckets != RGW_DEFAULT_MAX_BUCKETS)
+ if (max_buckets != default_max_buckets)
op_state.set_max_buckets(max_buckets);
if (s->info.args.exists("suspended"))
if (!user_email.empty())
user_info.user_email = user_email;
- user_info.max_buckets = op_state.get_max_buckets();
+ CephContext *cct = store->ctx();
+ if (op_state.max_buckets_specified) {
+ user_info.max_buckets = op_state.get_max_buckets();
+ } else {
+ user_info.max_buckets = cct->_conf->rgw_user_max_buckets;
+ }
+
user_info.suspended = op_state.get_suspension_status();
user_info.system = op_state.system;
if (!display_name.empty())
user_info.display_name = display_name;
- // will be set to RGW_DEFAULT_MAX_BUCKETS by default
- uint32_t max_buckets = op_state.get_max_buckets();
-
- ldout(store->ctx(), 0) << "max_buckets=" << max_buckets << " specified=" << op_state.max_buckets_specified << dendl;
-
if (op_state.max_buckets_specified)
- user_info.max_buckets = max_buckets;
+ user_info.max_buckets = op_state.get_max_buckets();
if (op_state.system_specified)
user_info.system = op_state.system;
--access=<access> Set access permissions for sub-user, should be one
of read, write, readwrite, full
--display-name=<name>
+ --max_buckets max number of buckets for a user
--system set the system flag on the user
--bucket=<bucket>
--pool=<pool>