mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
ca_status: add HTTP timeout 30 seconds
CA sometimes "forgot to answer" so we have to add timeout for http connection and ask again rather than wait for infinity. https://pagure.io/freeipa/issue/6766 Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
This commit is contained in:
@@ -123,7 +123,9 @@ def ca_status(ca_host=None):
|
||||
if ca_host is None:
|
||||
ca_host = api.env.ca_host
|
||||
status, _headers, body = http_request(
|
||||
ca_host, 8080, '/ca/admin/ca/getStatus')
|
||||
ca_host, 8080, '/ca/admin/ca/getStatus',
|
||||
# timeout: CA sometimes forgot to answer, we have to try again
|
||||
timeout=api.env.http_timeout)
|
||||
if status == 503:
|
||||
# Service temporarily unavailable
|
||||
return status
|
||||
|
||||
Reference in New Issue
Block a user