From: Yehuda Sadeh Date: Sat, 24 Sep 2016 17:01:00 +0000 (-0700) Subject: radosgw-admin: bucket reshard needs --num-shards to be specified X-Git-Tag: v0.94.10~8^2~15 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7cc1de860dce16e3956fe604b3bcb8ed1a2fe9ea;p=ceph.git radosgw-admin: bucket reshard needs --num-shards to be specified Signed-off-by: Yehuda Sadeh Conflicts: src/rgw/rgw_admin.cc --- diff --git a/src/rgw/rgw_admin.cc b/src/rgw/rgw_admin.cc index 4eed8ed2b02..a4483ad8db6 100644 --- a/src/rgw/rgw_admin.cc +++ b/src/rgw/rgw_admin.cc @@ -1214,6 +1214,7 @@ int main(int argc, char **argv) string job_id; int num_shards = 0; + bool num_shards_specified = false; int max_concurrent_ios = 32; uint64_t orphan_stale_secs = (24 * 3600); @@ -1322,6 +1323,7 @@ int main(int argc, char **argv) end_date = val; } else if (ceph_argparse_witharg(args, i, &val, "--num-shards", (char*)NULL)) { num_shards = atoi(val.c_str()); + num_shards_specified = true; } else if (ceph_argparse_witharg(args, i, &val, "--max-concurrent-ios", (char*)NULL)) { max_concurrent_ios = atoi(val.c_str()); } else if (ceph_argparse_witharg(args, i, &val, "--orphan-stale-secs", (char*)NULL)) { @@ -2545,6 +2547,11 @@ next: return EINVAL; } + if (!num_shards_specified) { + cerr << "ERROR: --num-shards not specified" << std::endl; + return EINVAL; + } + RGWBucketInfo bucket_info; map attrs; int ret = init_bucket(bucket_name, bucket_id, bucket_info, bucket, &attrs);