Use common replication wait timeout of 5min

Instead of multiple timeout values all over the code base, all
replication waits now use a common timeout value from api.env of 5
minutes. Waiting for HTTP/replica principal takes 90 to 120 seconds, so
5 minutes seem like a sufficient value for slow setups.

Fixes: https://pagure.io/freeipa/issue/7595
Signed-off-by: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Fraser Tweedale <ftweedal@redhat.com>
This commit is contained in:
Christian Heimes
2018-06-22 10:00:24 +02:00
parent 14c869b347
commit 1b966f708a
5 changed files with 22 additions and 9 deletions

View File

@@ -161,7 +161,7 @@ def wait_for_task(conn, dn):
return exit_code
def wait_for_entry(connection, dn, timeout=7200, attr=None, attrvalue='*',
def wait_for_entry(connection, dn, timeout, attr=None, attrvalue='*',
quiet=True):
"""Wait for entry and/or attr to show up
"""
@@ -751,7 +751,9 @@ class ReplicationManager(object):
# that we will have to set the memberof fixup task
self.need_memberof_fixup = True
wait_for_entry(a_conn, entry.dn)
wait_for_entry(
a_conn, entry.dn, timeout=api.env.replication_wait_timeout
)
def needs_memberof_fixup(self):
return self.need_memberof_fixup