summaryrefslogtreecommitdiffstats
path: root/base/server/python/pki/server
diff options
context:
space:
mode:
authorChristian Heimes <cheimes@redhat.com>2017-05-08 18:53:26 +0200
committerChristian Heimes <cheimes@redhat.com>2017-05-08 20:09:37 +0200
commitc0bb0ee8e36a85673e30352a7205414b215196a5 (patch)
tree854bb5ecf842c3565a18add4ad7e9283117a9364 /base/server/python/pki/server
parent00c17b3e2f81c9df12e1a89fc85dc2e3d4c3a2b1 (diff)
downloadpki-c0bb0ee8e36a85673e30352a7205414b215196a5.tar.gz
pki-c0bb0ee8e36a85673e30352a7205414b215196a5.tar.xz
pki-c0bb0ee8e36a85673e30352a7205414b215196a5.zip
pkispawn: wait after final restart
The finalization scriptlet now waits after service has been restarted. Change-Id: Id462728386b9d7e6b3364e1651ef6676115dd1de Bugzilla: BZ#1446364 Pagure: 2644 Signed-off-by: Christian Heimes <cheimes@redhat.com>
Diffstat (limited to 'base/server/python/pki/server')
-rw-r--r--base/server/python/pki/server/deployment/scriptlets/finalization.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/base/server/python/pki/server/deployment/scriptlets/finalization.py b/base/server/python/pki/server/deployment/scriptlets/finalization.py
index 3dc7f66de..941691c42 100644
--- a/base/server/python/pki/server/deployment/scriptlets/finalization.py
+++ b/base/server/python/pki/server/deployment/scriptlets/finalization.py
@@ -57,6 +57,13 @@ class PkiScriptlet(pkiscriptlet.AbstractBasePkiScriptlet):
# Optionally, programmatically 'restart' the configured PKI instance
if config.str2bool(deployer.mdict['pki_restart_configured_instance']):
deployer.systemd.restart()
+ # wait for startup
+ status = deployer.instance.wait_for_startup(60)
+ if status is None:
+ config.pki_log.error(
+ "server failed to restart",
+ extra=config.PKI_INDENTATION_LEVEL_1)
+ raise RuntimeError("server failed to restart")
# Optionally, 'purge' the entire temporary client infrastructure
# including the client NSS security databases and password files