From a0b0a0f91a16c7ac1d0c77c7678425697fef3ab6 Mon Sep 17 00:00:00 2001 From: Garming Sam Date: Thu, 30 Apr 2015 11:26:18 +1200 Subject: [PATCH] kcc: Allow RODC to be included in intersite topology 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 Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- python/samba/kcc/__init__.py | 5 ++++- python/samba/kcc/kcc_utils.py | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/python/samba/kcc/__init__.py b/python/samba/kcc/__init__.py index 0f2863b6b72..37fc844fd98 100644 --- a/python/samba/kcc/__init__.py +++ b/python/samba/kcc/__init__.py @@ -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) diff --git a/python/samba/kcc/kcc_utils.py b/python/samba/kcc/kcc_utils.py index dd87e26e4d7..fa8659f0b85 100644 --- a/python/samba/kcc/kcc_utils.py +++ b/python/samba/kcc/kcc_utils.py @@ -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__