]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: Fix dynamic resharding not working for empty zonegroup in period 33266/head
authorofriedma <ofriedma@redhat.com>
Tue, 3 Dec 2019 14:11:35 +0000 (16:11 +0200)
committerNathan Cutler <ncutler@suse.com>
Thu, 13 Feb 2020 13:32:52 +0000 (14:32 +0100)
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 <ofriedma@redhat.com>
(cherry picked from commit a76e4393728c3e74a943b635d2ac0652e0cc092a)

src/rgw/rgw_zone.h

index f0c8b7c60c16cc567d1b20b04fb2c0172ff02075..89f635a505d3c126a64ad3daa96ed14d7a38b906 100644 (file)
@@ -1059,7 +1059,7 @@ public:
 
   bool is_single_zonegroup() const
   {
-      return (period_map.zonegroups.size() == 1);
+      return (period_map.zonegroups.size() <= 1);
   }
 
   /*