diff options
author | Rob Crittenden <rcritten@redhat.com> | 2012-05-24 11:23:36 -0400 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2012-07-02 17:08:58 -0400 |
commit | e5b6260008a3a7132fdaef99d800406eb8872316 (patch) | |
tree | 9981186bd06f5574570f5743cba05cd0aa9ee963 /ipapython/platform/fedora16.py | |
parent | 6fb802152add24aa1842f4adccf59b23850ab336 (diff) | |
download | freeipa.git-e5b6260008a3a7132fdaef99d800406eb8872316.tar.gz freeipa.git-e5b6260008a3a7132fdaef99d800406eb8872316.tar.xz freeipa.git-e5b6260008a3a7132fdaef99d800406eb8872316.zip |
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
Diffstat (limited to 'ipapython/platform/fedora16.py')
-rw-r--r-- | ipapython/platform/fedora16.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ipapython/platform/fedora16.py b/ipapython/platform/fedora16.py index 985d368f..8b730e41 100644 --- a/ipapython/platform/fedora16.py +++ b/ipapython/platform/fedora16.py @@ -98,7 +98,7 @@ class Fedora16DirectoryService(Fedora16Service): restore_context(dirsrv_systemd) ipautil.run(["/bin/systemctl", "--system", "daemon-reload"],raiseonerr=False) - def restart(self, instance_name="", capture_output=True): + def restart(self, instance_name="", capture_output=True, wait=True): if len(instance_name) > 0: elements = self.service_name.split("@") srv_etc = os.path.join(self.SYSTEMD_ETC_PATH, self.service_name) @@ -109,7 +109,7 @@ class Fedora16DirectoryService(Fedora16Service): elif not os.path.samefile(srv_etc, srv_lnk): os.unlink(srv_lnk) os.symlink(srv_etc, srv_lnk) - super(Fedora16DirectoryService, self).restart(instance_name, capture_output=capture_output) + super(Fedora16DirectoryService, self).restart(instance_name, capture_output=capture_output, wait=wait) # Enforce restart of IPA services when we do enable it # This gets around the fact that after ipa-server-install systemd thinks |