From: Casey Bodley Date: Wed, 3 Mar 2021 21:58:33 +0000 (-0500) Subject: rgw: RGWSI_Zone::can_reshard() respects zonegroup 'resharding' feature X-Git-Tag: v18.0.0~787^2~81 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=ab964c5e0a2d38ca6ad47c0bddcc0f483f3d4737;p=ceph-ci.git rgw: RGWSI_Zone::can_reshard() respects zonegroup 'resharding' feature Signed-off-by: Casey Bodley --- diff --git a/src/rgw/services/svc_zone.cc b/src/rgw/services/svc_zone.cc index ab77f6aef6e..f314ea79c0c 100644 --- a/src/rgw/services/svc_zone.cc +++ b/src/rgw/services/svc_zone.cc @@ -1076,8 +1076,14 @@ bool RGWSI_Zone::need_to_log_metadata() const bool RGWSI_Zone::can_reshard() const { - return current_period->get_id().empty() || - (zonegroup->zones.size() == 1 && current_period->is_single_zonegroup()); + if (current_period->get_id().empty()) { + return true; // no realm + } + if (zonegroup->zones.size() == 1 && current_period->is_single_zonegroup()) { + return true; // single zone/zonegroup + } + // 'resharding' feature enabled in zonegroup + return zonegroup->supports(rgw::zone_features::resharding); } /**