From: ofriedma Date: Tue, 3 Dec 2019 14:11:35 +0000 (+0200) Subject: rgw: Fix dynamic resharding not working for empty zonegroup in period X-Git-Tag: v14.2.10~224^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6b10cbf1e6d3afa19601b323fd607db12096a9c8;p=ceph.git rgw: Fix dynamic resharding not working for empty zonegroup in period Sometimes when cluster has been upgraded from jewel, the period's zonegroup could be empty, so no dynamic resharding. This fix should fix it and return true for less than 1 (0) zonegroup in period Fixes: https://tracker.ceph.com/issues/43188 Signed-off-by: Or Friedmann (cherry picked from commit a76e4393728c3e74a943b635d2ac0652e0cc092a) --- diff --git a/src/rgw/rgw_zone.h b/src/rgw/rgw_zone.h index f0c8b7c60c16..89f635a505d3 100644 --- a/src/rgw/rgw_zone.h +++ b/src/rgw/rgw_zone.h @@ -1059,7 +1059,7 @@ public: bool is_single_zonegroup() const { - return (period_map.zonegroups.size() == 1); + return (period_map.zonegroups.size() <= 1); } /*