diff options
author | Martin Kosek <mkosek@redhat.com> | 2013-03-13 14:44:20 +0100 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2013-03-14 09:35:25 +0100 |
commit | 354a5db38e46aaf7ff4ecb0b6ee54a18194c376e (patch) | |
tree | f7c6bc908940fefa64a8fe28848a5c4bb62d89f7 /ipa-client/ipa-install/ipa-client-install | |
parent | 452ffa143aadba5f16f4fe67720e28852fdf1fb7 (diff) | |
download | freeipa-354a5db38e46aaf7ff4ecb0b6ee54a18194c376e.tar.gz freeipa-354a5db38e46aaf7ff4ecb0b6ee54a18194c376e.tar.xz freeipa-354a5db38e46aaf7ff4ecb0b6ee54a18194c376e.zip |
Avoid multiple client discovery with fixed server list
In client discovery module, we used to run up to three discovery
processes even though we received a fixed list of servers to connect
to. This could result in up to 3 identical "not an IPA server" error
messages when the passed server is not an IPA server.
Error out immediately when we are discovering against a fixed set
of servers.
Related to fixes in https://fedorahosted.org/freeipa/ticket/3418
Diffstat (limited to 'ipa-client/ipa-install/ipa-client-install')
-rwxr-xr-x | ipa-client/ipa-install/ipa-client-install | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ipa-client/ipa-install/ipa-client-install b/ipa-client/ipa-install/ipa-client-install index 97332d1a0..d9e1b7e78 100755 --- a/ipa-client/ipa-install/ipa-client-install +++ b/ipa-client/ipa-install/ipa-client-install @@ -1738,6 +1738,17 @@ def install(options, env, fstore, statestore): ret = ds.search(domain=options.domain, servers=options.server, hostname=hostname, ca_cert_path=get_cert_path(options.ca_cert_file)) + if options.server and ret != 0: + # There is no point to continue with installation as server list was + # passed as a fixed list of server and thus we cannot discover any + # better result + root_logger.error("Failed to verify that %s is an IPA Server.", + ', '.join(options.server)) + root_logger.error("This may mean that the remote server is not up " + "or is not reachable due to network or firewall settings.") + print_port_conf_info() + return CLIENT_INSTALL_ERROR + if ret == ipadiscovery.BAD_HOST_CONFIG: root_logger.error("Can't get the fully qualified name of this host") root_logger.info("Check that the client is properly configured") |