summaryrefslogtreecommitdiffstats
path: root/base/deploy
diff options
context:
space:
mode:
authorAbhishek Koneru <akoneru@redhat.com>2013-03-28 09:32:45 -0400
committerAbhishek Koneru <akoneru@redhat.com>2013-04-02 17:02:37 -0400
commita698f1052fc299ffdcd155fb1618780f6acb0e2d (patch)
tree3dbb9b124a3000105550763e3b64fceebe95b414 /base/deploy
parent632aa9a012839bde3253ff7a6698797ba83d4658 (diff)
downloadpki-a698f1052fc299ffdcd155fb1618780f6acb0e2d.tar.gz
pki-a698f1052fc299ffdcd155fb1618780f6acb0e2d.tar.xz
pki-a698f1052fc299ffdcd155fb1618780f6acb0e2d.zip
Change timeout from number of tries to total time.
Change the current implementation of time out as number of tries to, the total time for trying to get the status of the Tomcat. Ticket #563
Diffstat (limited to 'base/deploy')
-rw-r--r--base/deploy/man/man8/pkidestroy.82
-rw-r--r--base/deploy/src/scriptlets/pkihelper.py13
2 files changed, 8 insertions, 7 deletions
diff --git a/base/deploy/man/man8/pkidestroy.8 b/base/deploy/man/man8/pkidestroy.8
index 56dc37907..407a915aa 100644
--- a/base/deploy/man/man8/pkidestroy.8
+++ b/base/deploy/man/man8/pkidestroy.8
@@ -18,7 +18,7 @@
pkidestroy \- Removes a subsystem from an instance of Certificate Server.
.SH SYNOPSIS
-pkidestroy -s <subsystem> -i <instance> [-h] [-v] [-p <prefix>]
+pkidestroy -s <subsystem> -i <instance> [-u <secutiry domain username>] [-W <security domain password file>] [-h] [-v] [-p <prefix>]
.SH DESCRIPTION
Removes a subsystem from an instance of Certificate Server. This utility removes any of the Java-based Certificate Server subsystems (CA, KRA, OCSP, and TKS).
diff --git a/base/deploy/src/scriptlets/pkihelper.py b/base/deploy/src/scriptlets/pkihelper.py
index 92707c553..c1828ef41 100644
--- a/base/deploy/src/scriptlets/pkihelper.py
+++ b/base/deploy/src/scriptlets/pkihelper.py
@@ -33,6 +33,7 @@ import shutil
import string
import subprocess
import time
+from datetime import datetime
from grp import getgrgid
from grp import getgrnam
from pwd import getpwnam
@@ -1015,14 +1016,14 @@ class instance:
return None
def wait_for_startup(self, timeout):
- tries = 1
- status = self.get_instance_status()
+ start_time = datetime.today()
+ status = None
while status != "running":
- if tries >= timeout:
- return None
- time.sleep(1)
status = self.get_instance_status()
- tries = tries + 1
+ time.sleep(1);
+ stop_time = datetime.today()
+ if (stop_time - start_time).total_seconds() >= timeout:
+ break
return status
# PKI Deployment Directory Class