mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
ipa-replica-manage: implicitly ignore initial time skew in force-sync
When performing force synchronization, implicitly ignore initial time skew (if any) and restore it afterwards. This also changes semantics of force-sync by waiting until the end of the initial replication. Fixes https://pagure.io/freeipa/issue/7211 Reviewed-By: Rob Crittenden <rcritten@redhat.com>
This commit is contained in:
parent
051786ce37
commit
620f9653ba
@ -1235,8 +1235,14 @@ def force_sync(realm, thishost, fromhost, dirman_passwd, nolookup=False):
|
||||
repl = replication.ReplicationManager(realm, thishost, dirman_passwd)
|
||||
repl.force_sync(repl.conn, fromhost)
|
||||
else:
|
||||
ds = dsinstance.DsInstance(realm_name=realm)
|
||||
ds.ldapi = os.getegid() == 0
|
||||
ds.replica_manage_time_skew(prevent=False)
|
||||
repl = replication.ReplicationManager(realm, fromhost, dirman_passwd)
|
||||
repl.force_sync(repl.conn, thishost)
|
||||
agreement = repl.get_replication_agreement(thishost)
|
||||
repl.wait_for_repl_init(repl.conn, agreement.dn)
|
||||
ds.replica_manage_time_skew(prevent=True)
|
||||
|
||||
def show_DNA_ranges(hostname, master, realm, dirman_passwd, nextrange=False,
|
||||
nolookup=False):
|
||||
|
Loading…
Reference in New Issue
Block a user