Don't call memberof task when re-initializing a replica.

memberof is not in the EXCLUDE list of nsDS5ReplicatedAttributeListTotal
so we have no need of running the task, memberof will come with the
data.

If that attribute doesn't exist then this agreement was created with
an older version of 389-ds, we DO need to initialize memberOf.

https://fedorahosted.org/freeipa/ticket/2199
This commit is contained in:
Rob Crittenden 2012-02-22 14:09:02 -05:00
parent aff6bc0e63
commit 33c29033c8

View File

@ -413,8 +413,11 @@ def re_initialize(realm, thishost, fromhost, dirman_passwd):
repl.initialize_replication(agreement.dn, repl.conn)
repl.wait_for_repl_init(repl.conn, agreement.dn)
ds = dsinstance.DsInstance(realm_name = realm, dm_password = dirman_passwd)
ds.init_memberof()
# If the agreement doesn't have nsDS5ReplicatedAttributeListTotal it means
# we did not replicate memberOf, do so now.
if not entry[0].getValue('nsDS5ReplicatedAttributeListTotal'):
ds = dsinstance.DsInstance(realm_name = realm, dm_password = dirman_passwd)
ds.init_memberof()
def force_sync(realm, thishost, fromhost, dirman_passwd):