URL: https://github.com/freeipa/freeipa/pull/292
Author: flo-renaud
 Title: #292: Increase the timeout waiting for certificate issuance in installer
Action: synchronized

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/292/head:pr292
git checkout pr292
From 34c69ef11c2bbe2e526900fc75d8451fe52bddc9 Mon Sep 17 00:00:00 2001
From: Florence Blanc-Renaud <f...@redhat.com>
Date: Wed, 30 Nov 2016 16:34:16 +0100
Subject: [PATCH] Increase the timeout waiting for certificate issuance in
 installer

During the server installation, the installer requests certificates
through certmonger. The current timeout is 60s and is too low.
Increase this timeout to api.env.startup_timeout as done in
ipa_cacert_manage or ipa_certupdate.py
(the code checks the status each 5s up to the timeout value).

https://fedorahosted.org/freeipa/ticket/6433
---
 ipalib/install/certmonger.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ipalib/install/certmonger.py b/ipalib/install/certmonger.py
index 3ea900b..c79cf93 100644
--- a/ipalib/install/certmonger.py
+++ b/ipalib/install/certmonger.py
@@ -30,6 +30,7 @@
 import shlex
 import subprocess
 import tempfile
+from ipalib import api
 from ipapython.ipa_log_manager import root_logger
 from ipaplatform.paths import paths
 from ipaplatform import services
@@ -309,7 +310,7 @@ def request_and_wait_for_cert(
     reqId = request_cert(nssdb, nickname, subject, principal,
                          passwd_fname, dns, ca, profile,
                          pre_command, post_command)
-    state = wait_for_request(reqId, timeout=60)
+    state = wait_for_request(reqId, api.env.startup_timeout)
     ca_error = get_request_value(reqId, 'ca-error')
     if state != 'MONITORING' or ca_error:
         raise RuntimeError("Certificate issuance failed ({})".format(state))
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to