summaryrefslogtreecommitdiffstats
path: root/ipaplatform
diff options
context:
space:
mode:
authorMartin Basti <mbasti@redhat.com>2015-05-21 13:25:10 +0200
committerPetr Vobornik <pvoborni@redhat.com>2015-05-22 15:51:05 +0200
commit3d17bf8e639616893d6937d98662ccc7541d1e23 (patch)
tree2ecaa35b7c9c93e1b0f7f36e52fd737c1db356d2 /ipaplatform
parent98e4c6d6de130a0e94cd1705acc5418bdbda1eb1 (diff)
downloadfreeipa-3d17bf8e639616893d6937d98662ccc7541d1e23.tar.gz
freeipa-3d17bf8e639616893d6937d98662ccc7541d1e23.tar.xz
freeipa-3d17bf8e639616893d6937d98662ccc7541d1e23.zip
Server Upgrade: wait until DS is ready
During server upgrade we should wait until DS is ready after restart, otherwise connection error is raised. Instead of 389 port, the DS socket is checked. https://fedorahosted.org/freeipa/ticket/4904 Reviewed-By: Fraser Tweedale <ftweedal@redhat.com>
Diffstat (limited to 'ipaplatform')
-rw-r--r--ipaplatform/redhat/services.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/ipaplatform/redhat/services.py b/ipaplatform/redhat/services.py
index d6fa080ad..565bf1fde 100644
--- a/ipaplatform/redhat/services.py
+++ b/ipaplatform/redhat/services.py
@@ -153,6 +153,20 @@ class RedHatDirectoryService(RedHatService):
super(RedHatDirectoryService, self).restart(instance_name,
capture_output=capture_output, wait=wait)
+ def wait_for_open_ports(self, instance_name=""):
+ if instance_name.endswith('.service'):
+ instance_name = instance_name[:-8]
+ if instance_name.startswith('dirsrv@'):
+ instance_name = instance_name[7:]
+
+ if instance_name:
+
+ ipautil.wait_for_open_socket(
+ paths.SLAPD_INSTANCE_SOCKET_TEMPLATE % instance_name,
+ self.api.env.startup_timeout)
+ else:
+ super(RedHatDirectoryService, self).wait_for_open_ports()
+
class RedHatIPAService(RedHatService):
# Enforce restart of IPA services when we do enable it