1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-10 01:18:15 +03:00

kcc: Make more fault tolerant on DC demotion

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Garming Sam 2016-07-21 13:08:31 +12:00 committed by Garming Sam
parent a5e0a2fef1
commit 0c8e9a862a

View File

@ -533,9 +533,18 @@ class KCC(object):
connections_and_dsas = []
for dsa in local_dsas.values():
for cn in dsa.connect_table.values():
if cn.to_be_deleted:
continue
s_dnstr = cn.get_from_dnstr()
if s_dnstr is None:
continue
if s_dnstr not in local_dsas:
from_dsa = self.get_dsa(s_dnstr)
# Samba ONLY: ISTG removes connections to dead DCs
if from_dsa is None and '\\0ADEL' in s_dnstr:
logger.info("DSA appears deleted, removing connection %s" % s_dnstr)
cn.to_be_deleted = True
continue
connections_and_dsas.append((cn, dsa, from_dsa))
self._ensure_connections_are_loaded(x[0] for x in connections_and_dsas)