]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
qa/rgw: multisite checkpoints consider pubsub zone
authorCasey Bodley <cbodley@redhat.com>
Tue, 28 Jan 2020 19:15:44 +0000 (14:15 -0500)
committerCasey Bodley <cbodley@redhat.com>
Tue, 28 Jan 2020 20:32:58 +0000 (15:32 -0500)
pubsub zones are configured to only sync_from the master zone, so bucket
checkpoints should ignore its sync status with respect to other zones

Fixes: https://tracker.ceph.com/issues/43768
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/test/rgw/rgw_multi/multisite.py
src/test/rgw/rgw_multi/tests.py
src/test/rgw/rgw_multi/zone_ps.py

index f189a507839715739338dca250fbf7ac90e54232..a0a53fe4d5f0eebdf8eccacb36e2d3cb6ba8c5b0 100644 (file)
@@ -164,6 +164,9 @@ class Zone(SystemObject, SystemObject.CreateDelete, SystemObject.GetSet, SystemO
     def tier_type(self):
         raise NotImplementedError
 
+    def syncs_from(self, zone_name):
+        return zone_name != self.name
+
     def has_buckets(self):
         return True
 
index 31b8233c0316cdd30133f72165a601b0c04e2df8..911eaf0dcacc7b8eed0db54bd2462a5f40d1ba00 100644 (file)
@@ -354,7 +354,7 @@ def compare_bucket_status(target_zone, source_zone, bucket_name, log_status, syn
     return True
 
 def zone_data_checkpoint(target_zone, source_zone):
-    if target_zone == source_zone:
+    if not target_zone.syncs_from(source_zone):
         return
 
     log_status = data_source_log_status(source_zone)
@@ -384,7 +384,7 @@ def zonegroup_data_checkpoint(zonegroup_conns):
             zone_data_checkpoint(target_conn.zone, source_conn.zone)
 
 def zone_bucket_checkpoint(target_zone, source_zone, bucket_name):
-    if target_zone == source_zone:
+    if not target_zone.syncs_from(source_zone):
         return
 
     log_status = bucket_source_log_status(source_zone, bucket_name)
index 090fbc789fc2bab29e5997cbe3b9de03c70673fe..0034e8bb986ec517369788577e574515007ffdd2 100644 (file)
@@ -49,6 +49,9 @@ class PSZone(Zone):  # pylint: disable=too-many-ancestors
     def tier_type(self):
         return "pubsub"
 
+    def syncs_from(self, zone_name):
+        return zone_name == self.master_zone.name
+
     def create(self, cluster, args=None, **kwargs):
         if args is None:
             args = ''