kcc: Allow RODC to be included in intersite topology
authorGarming Sam <garming@catalyst.net.nz>
Wed, 29 Apr 2015 23:26:18 +0000 (11:26 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 12 Jun 2015 04:57:14 +0000 (06:57 +0200)
This creates behaviour not described by ADTS. RODC are now treated as
RED, however they are demoted to the equivalent of WHITE when running
the first half of the algorithm.

The change implies that RED does in fact refer to full-replicas, not
writable replicas.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/kcc/__init__.py
python/samba/kcc/kcc_utils.py

index 0f2863b6b723a1e261c45455930a14d89019ae61..37fc844fd980ac3f938ac539b598ff4c21ca0a32 100644 (file)
@@ -1633,7 +1633,10 @@ class KCC(object):
             bh = self.get_bridgehead(vertex.site, vertex.part, transport,
                                      partial_replica_okay, detect_failed)
             if bh is None:
-                found_failed = True
+                if vertex.site.is_rodc_site():
+                    vertex.accept_red_red.append(t_guid)
+                else:
+                    found_failed = True
                 continue
 
             vertex.accept_red_red.append(t_guid)
index dd87e26e4d7515c588dd83cd77b9d5479baa6ed0..fa8659f0b853dc3b8f685a3531d4d0c33142bb7a 100644 (file)
@@ -1651,6 +1651,11 @@ class Site(object):
             return True
         return False
 
+    def is_rodc_site(self):
+        if len(self.dsa_table) > 0 and len(self.rw_dsa_table) == 0:
+            return True
+        return False
+
     def __str__(self):
         '''Debug dump string output of class'''
         text = "%s:" % self.__class__.__name__