diff options
author | Alexander Bokovoy <abokovoy@redhat.com> | 2013-03-06 10:17:58 +0200 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2013-03-21 17:14:55 +0100 |
commit | 41031fe121d6ec8bc9a6bb48b62068a9af905dc3 (patch) | |
tree | 3c4b38e314a3c24c2a4aa4097841032c7ab8c7ed /ipapython | |
parent | 1336b399065ff47477029ba487f1d392f1ce6ac8 (diff) | |
download | freeipa.git-41031fe121d6ec8bc9a6bb48b62068a9af905dc3.tar.gz freeipa.git-41031fe121d6ec8bc9a6bb48b62068a9af905dc3.tar.xz freeipa.git-41031fe121d6ec8bc9a6bb48b62068a9af905dc3.zip |
Process exceptions when talking to Dogtag
The problem is the ca_status() uses an HTTP GET operation to check Dogtag's
status. Under some circumstances Dogtag may take a long time to respond, so the
HTTP GET may time out much earlier than 2 minutes. And since the above code
doesn't catch the exception, the whole loop fails immediately, so it doesn't
wait for a full 2 minutes as expected.
https://fedorahosted.org/freeipa/ticket/3492
Diffstat (limited to 'ipapython')
-rw-r--r-- | ipapython/platform/fedora16/service.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ipapython/platform/fedora16/service.py b/ipapython/platform/fedora16/service.py index c2e35d32..dac8c004 100644 --- a/ipapython/platform/fedora16/service.py +++ b/ipapython/platform/fedora16/service.py @@ -136,7 +136,10 @@ class Fedora16CAService(Fedora16Service): timeout = api.env.startup_timeout op_timeout = time.time() + timeout while time.time() < op_timeout: - status = dogtag.ca_status() + try: + status = dogtag.ca_status() + except Exception: + status = 'check interrupted' root_logger.debug('The CA status is: %s' % status) if status == 'running': break |