Add LDAP server fallback to client installer

Change the discovery code to validate all servers, regardless of where
the originated (either via SRV records or --server). This will prevent
the client installer from failing if one of those records points to a
server that is either not running or is not an IPA server.

If a server is not available it is not removed from the list of configured
servers, simply moved to the end of the list.

If a server is not an IPA server it is removed.

https://fedorahosted.org/freeipa/ticket/3388
This commit is contained in:
Rob Crittenden
2013-02-04 09:35:13 -05:00
parent 076775a0f8
commit cbb262dc07
4 changed files with 101 additions and 61 deletions

View File

@@ -770,7 +770,7 @@ def add_link(realm, replica1, replica2, dirman_passwd, options):
standard_logging_setup(console_format='%(message)s')
ds = ipadiscovery.IPADiscovery()
ret = ds.search(server=replica2)
ret = ds.search(servers=[replica2])
if ret == ipadiscovery.NOT_IPA_SERVER:
sys.exit("Connection unsuccessful: %s is not an IPA Server." %