mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-23 23:50:03 -06:00
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
This commit is contained in:
parent
1336b39906
commit
41031fe121
@ -136,7 +136,10 @@ class Fedora16CAService(Fedora16Service):
|
|||||||
timeout = api.env.startup_timeout
|
timeout = api.env.startup_timeout
|
||||||
op_timeout = time.time() + timeout
|
op_timeout = time.time() + timeout
|
||||||
while time.time() < op_timeout:
|
while time.time() < op_timeout:
|
||||||
|
try:
|
||||||
status = dogtag.ca_status()
|
status = dogtag.ca_status()
|
||||||
|
except Exception:
|
||||||
|
status = 'check interrupted'
|
||||||
root_logger.debug('The CA status is: %s' % status)
|
root_logger.debug('The CA status is: %s' % status)
|
||||||
if status == 'running':
|
if status == 'running':
|
||||||
break
|
break
|
||||||
|
Loading…
Reference in New Issue
Block a user