From 6b10cbf1e6d3afa19601b323fd607db12096a9c8 Mon Sep 17 00:00:00 2001 From: ofriedma Date: Tue, 3 Dec 2019 16:11:35 +0200 Subject: [PATCH] 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) --- src/rgw/rgw_zone.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } /* -- 2.47.3