diff options
author | Alexander Bokovoy <abokovoy@redhat.com> | 2013-03-21 17:13:46 +0100 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2013-03-21 17:19:52 +0100 |
commit | 4f8c88988eb14f59df37750d8be31e45d7ebf55c (patch) | |
tree | b685c348163a903fcfa18c9bcf31a0d52b770001 | |
parent | fdfcd2cf2456fce303553d88cbf53067c975d2f3 (diff) | |
download | freeipa.git-4f8c88988eb14f59df37750d8be31e45d7ebf55c.tar.gz freeipa.git-4f8c88988eb14f59df37750d8be31e45d7ebf55c.tar.xz freeipa.git-4f8c88988eb14f59df37750d8be31e45d7ebf55c.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
-rw-r--r-- | ipapython/platform/fedora16.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ipapython/platform/fedora16.py b/ipapython/platform/fedora16.py index 628cad13..0bf71569 100644 --- a/ipapython/platform/fedora16.py +++ b/ipapython/platform/fedora16.py @@ -158,7 +158,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 |