join: LDAP connection to remote DC can timeout in large join
authorTim Beale <timbeale@catalyst.net.nz>
Wed, 17 Oct 2018 01:41:12 +0000 (14:41 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 18 Oct 2018 04:15:24 +0000 (06:15 +0200)
commitd8ea16a3fb6d8ad9b738e8e71adc07079a292079
treea76913fff40118e6c630e5fe8bfb14594bfa1a0a
parent85ec8644251eff0174c973747b59043180ac58c7
join: LDAP connection to remote DC can timeout in large join

When joining a very large domain (e.g. 100K users), the replication can
take so long that the LDAP connection to the remote DC times out.

This patch avoids the problem by adding in a sanity-check after the
replication finishes that the LDB connection is still alive. If not,
then we reconnect.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13612

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/join.py