From e5b6260008a3a7132fdaef99d800406eb8872316 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Thu, 24 May 2012 11:23:36 -0400 Subject: Centralize timeout for waiting for servers to start. All service start/restart currently go through ipapython/platform so move the "wait for service to start" code there as well. A dictionary of known services and ports to wait on is defined in base.py This is referenced by the platforms by instance name to determine what to wait for. For the case of dirsrv if we get that as a plain name (no specific instance) it is assumed to be the main IPA service. https://fedorahosted.org/freeipa/ticket/2375 https://fedorahosted.org/freeipa/ticket/2610 --- ipaserver/install/plugins/baseupdate.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ipaserver/install/plugins/baseupdate.py') diff --git a/ipaserver/install/plugins/baseupdate.py b/ipaserver/install/plugins/baseupdate.py index 227dc917..f91cf5de 100644 --- a/ipaserver/install/plugins/baseupdate.py +++ b/ipaserver/install/plugins/baseupdate.py @@ -34,6 +34,14 @@ class DSRestart(service.Service): """ service.Service.__init__(self, "dirsrv") + def start(self, instance_name="", capture_output=True, wait=True): + """ + During upgrades the server is listening only on the socket so + we don't want to wait on ports. The caller is responsible for + waiting for the socket to be ready. + """ + super(DSRestart, self).start(wait=False) + def create_instance(self): self.step("stopping directory server", self.stop) self.step("starting directory server", self.start) -- cgit