Skip to content

Commit

Permalink
pkispawn: wait after final restart
Browse files Browse the repository at this point in the history
The finalization scriptlet now waits after service has been restarted.

Change-Id: Id462728386b9d7e6b3364e1651ef6676115dd1de
Bugzilla: BZ#1446364
Pagure: 2644
Signed-off-by: Christian Heimes <[email protected]>
  • Loading branch information
tiran committed May 8, 2017
1 parent 00c17b3 commit c0bb0ee
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
5 changes: 0 additions & 5 deletions .travis/40-spawn-ca
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,3 @@
set -e

pkispawn -vv -f ${BUILDDIR}/pki/.travis/pki.cfg -s CA

echo "Waiting for port 8080"
for i in {1..20}; do
curl http://localhost:8080 && break || sleep 1
done
5 changes: 0 additions & 5 deletions .travis/50-spawn-kra
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,3 @@
set -e

pkispawn -vv -f ${BUILDDIR}/pki/.travis/pki.cfg -s KRA

echo "Waiting for port 8080"
for i in {1..20}; do
curl http://localhost:8080 && break || sleep 1
done
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ def spawn(self, deployer):
# 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
Expand Down

0 comments on commit c0bb0ee

Please sign in to comment.