summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Kosek <mkosek@redhat.com>2013-03-13 14:44:20 +0100
committerMartin Kosek <mkosek@redhat.com>2013-03-14 09:36:08 +0100
commitcc51f969cfb83b9d7fcff3c064feebb3eb5702cd (patch)
tree86583a68fd5c309f392389d3ce69bc8b060166f4
parentaf4a1e53f782a977a053bb3b986a712dc5a65fbf (diff)
downloadfreeipa.git-cc51f969cfb83b9d7fcff3c064feebb3eb5702cd.tar.gz
freeipa.git-cc51f969cfb83b9d7fcff3c064feebb3eb5702cd.tar.xz
freeipa.git-cc51f969cfb83b9d7fcff3c064feebb3eb5702cd.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
-rwxr-xr-xipa-client/ipa-install/ipa-client-install11
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 d3003ad0..db3d37e4 100755
--- a/ipa-client/ipa-install/ipa-client-install
+++ b/ipa-client/ipa-install/ipa-client-install
@@ -1735,6 +1735,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")