Optimize detection of best host in freenasldap.py for large environments
Two minor optimizations:
1) Once we detect the AD site we're a member of, store that information in the config db.
2) If there are more than 5 DCs in a site, don't bother trying to figure out which DC is the best one to talk to for our LDAP queries in freenasldap.py. Use the first one that responds.
This is part of addressing issue of slow AD join process.
#10 Updated by Andrew Walker almost 2 years ago
Method to test:
1) Configure AD environment with "Sites and Subnets" configured to put the TrueNAS server in a non-default site.
2) Join AD, then verify that the site name is permanently stored in the UI under Directory Services-> Active Directory "Site".