Log dogtag auth timeout in install, provide hint to increase it

There is a loop which keeps trying to bind as the admin user
which will fail until it is replicated.

In the case where there is a lot to replicate the default
5 minute timeout may be insufficient. Provide a hint for
tuning.

Fixes: https://pagure.io/freeipa/issue/7971
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
This commit is contained in:
Rob Crittenden
2019-07-05 14:15:32 -04:00
committed by Florence Blanc-Renaud
parent 54035982e5
commit adf2eab263

View File

@@ -482,7 +482,8 @@ class DogtagInstance(service.Service):
self.master_host self.master_host
) )
logger.debug( logger.debug(
"Waiting for %s to appear on %s", self.admin_dn, master_conn "Waiting %s seconds for %s to appear on %s",
api.env.replication_wait_timeout, self.admin_dn, master_conn
) )
deadline = time.time() + api.env.replication_wait_timeout deadline = time.time() + api.env.replication_wait_timeout
while time.time() < deadline: while time.time() < deadline:
@@ -499,6 +500,9 @@ class DogtagInstance(service.Service):
logger.error( logger.error(
"Unable to log in as %s on %s", self.admin_dn, master_conn "Unable to log in as %s on %s", self.admin_dn, master_conn
) )
logger.info(
"[hint] tune with replication_wait_timeout"
)
raise errors.NotFound( raise errors.NotFound(
reason="{} did not replicate to {}".format( reason="{} did not replicate to {}".format(
self.admin_dn, master_conn self.admin_dn, master_conn