diff options
author | Martin Kosek <mkosek@redhat.com> | 2011-10-12 10:55:08 +0200 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2011-10-12 00:50:22 -0400 |
commit | 17f247d6c2aef177c40a690f886b0773a88a6dfa (patch) | |
tree | 8862c27a8c011d074309a5213991a77286d85e01 /ipa-client/ipaclient/ipadiscovery.py | |
parent | 2aa63fe4a98f6bae755b4ede607adc2068103c42 (diff) | |
download | freeipa-17f247d6c2aef177c40a690f886b0773a88a6dfa.tar.gz freeipa-17f247d6c2aef177c40a690f886b0773a88a6dfa.tar.xz freeipa-17f247d6c2aef177c40a690f886b0773a88a6dfa.zip |
ipa-client-install hangs if the discovered server is unresponsive
Add a timeout to the wget call to cover a case when autodiscovered
server does not response to our attempt to download ca.crt. Let
user specify a different IPA server in that case.
https://fedorahosted.org/freeipa/ticket/1960
Diffstat (limited to 'ipa-client/ipaclient/ipadiscovery.py')
-rw-r--r-- | ipa-client/ipaclient/ipadiscovery.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ipa-client/ipaclient/ipadiscovery.py b/ipa-client/ipaclient/ipadiscovery.py index cd5f81bd5..e786e98d8 100644 --- a/ipa-client/ipaclient/ipadiscovery.py +++ b/ipa-client/ipaclient/ipadiscovery.py @@ -220,7 +220,8 @@ class IPADiscovery: raise RuntimeError("Creating temporary directory failed: %s" % str(e)) try: - run(["/usr/bin/wget", "-O", "%s/ca.crt" % temp_ca_dir, "http://%s/ipa/config/ca.crt" % format_netloc(thost)]) + run(["/usr/bin/wget", "-O", "%s/ca.crt" % temp_ca_dir, "-T", "15", "-t", "2", + "http://%s/ipa/config/ca.crt" % format_netloc(thost)]) except CalledProcessError, e: logging.debug('Retrieving CA from %s failed.\n%s' % (thost, str(e))) return [NOT_IPA_SERVER] |