]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw: Fix dynamic resharding not working for empty zonegroup in period
authorofriedma <ofriedma@redhat.com>
Tue, 3 Dec 2019 14:11:35 +0000 (16:11 +0200)
committerOr Friedmann <ofriedma@redhat.com>
Mon, 9 Dec 2019 09:36:57 +0000 (11:36 +0200)
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>
src/rgw/rgw_zone.h

index 9ce902040b3bde645800d439561328f3930f6740..8673ecdbe7bd8f0b62d233a0a3a8eaf3dbc3a18c 100644 (file)
@@ -1083,7 +1083,7 @@ public:
 
   bool is_single_zonegroup() const
   {
-      return (period_map.zonegroups.size() == 1);
+      return (period_map.zonegroups.size() <= 1);
   }
 
   /*