summaryrefslogtreecommitdiffstats
path: root/ipaserver/install/installutils.py
diff options
context:
space:
mode:
authorAlexander Bokovoy <abokovoy@redhat.com>2011-10-17 14:17:07 +0300
committerAlexander Bokovoy <abokovoy@redhat.com>2011-10-24 15:23:11 +0300
commit4e96896ce17b4a105c433f468efef8c08bd7bf2a (patch)
tree09d164aef8f9ae68fda50af57686c6e8faa5951c /ipaserver/install/installutils.py
parent9ae43bbdd40d90d52e359ef5e025038ce822311e (diff)
downloadfreeipa-4e96896ce17b4a105c433f468efef8c08bd7bf2a.tar.gz
freeipa-4e96896ce17b4a105c433f468efef8c08bd7bf2a.tar.xz
freeipa-4e96896ce17b4a105c433f468efef8c08bd7bf2a.zip
Spin for connection success also when socket is not (yet) available
We were spinning for socket connection if attempt to connect returned errno 111 (connection refused). However, it is not enough for local AF_UNIX sockets as heavy applications might not be able to start yet and therefore the whole path might be missing. So spin for errno 2 (no such file or directory) as well. Partial fix for https://fedorahosted.org/freeipa/ticket/1990
Diffstat (limited to 'ipaserver/install/installutils.py')
-rw-r--r--ipaserver/install/installutils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ipaserver/install/installutils.py b/ipaserver/install/installutils.py
index ca9a82611..4e6788cc3 100644
--- a/ipaserver/install/installutils.py
+++ b/ipaserver/install/installutils.py
@@ -508,7 +508,7 @@ def wait_for_open_socket(socket_name, timeout=0):
s.close()
break;
except socket.error, e:
- if e.errno == 111: # 111: Connection refused
+ if e.errno in (2,111): # 111: Connection refused, 2: File not found
if timeout and time.time() > op_timeout: # timeout exceeded
raise e
time.sleep(1)