diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-23 16:45:13 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-23 16:45:13 +0000 |
commit | 389020e14594e4894e28d1eb9103c210b142509e (patch) | |
tree | 2ba734cdd7a243f46dda7c3d0cc88c2293d9699f /src/rgw/rgw_admin.cc | |
parent | Adding upstream version 18.2.2. (diff) | |
download | ceph-389020e14594e4894e28d1eb9103c210b142509e.tar.xz ceph-389020e14594e4894e28d1eb9103c210b142509e.zip |
Adding upstream version 18.2.3.upstream/18.2.3
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/rgw/rgw_admin.cc')
-rw-r--r-- | src/rgw/rgw_admin.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/rgw/rgw_admin.cc b/src/rgw/rgw_admin.cc index 73b0736b1..5cabd2a9b 100644 --- a/src/rgw/rgw_admin.cc +++ b/src/rgw/rgw_admin.cc @@ -3025,6 +3025,14 @@ int check_reshard_bucket_params(rgw::sal::Driver* driver, return ret; } + if (! is_layout_reshardable((*bucket)->get_info().layout)) { + std::cerr << "Bucket '" << (*bucket)->get_name() << + "' currently has layout '" << + current_layout_desc((*bucket)->get_info().layout) << + "', which does not support resharding." << std::endl; + return -EINVAL; + } + int num_source_shards = rgw::current_num_shards((*bucket)->get_info().layout); if (num_shards <= num_source_shards && !yes_i_really_mean_it) { @@ -8107,7 +8115,8 @@ next: "have the resharding feature enabled." << std::endl; return ENOTSUP; } - if (!RGWBucketReshard::can_reshard(bucket->get_info(), zone_svc) && + + if (!RGWBucketReshard::should_zone_reshard_now(bucket->get_info(), zone_svc) && !yes_i_really_mean_it) { std::cerr << "Bucket '" << bucket->get_name() << "' already has too many " "log generations (" << bucket->get_info().layout.logs.size() << ") " |