summaryrefslogtreecommitdiffstats
path: root/install/tools/ipa-replica-manage
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2012-02-22 14:09:02 -0500
committerRob Crittenden <rcritten@redhat.com>2012-02-27 17:27:56 -0500
commit33c29033c84cef47bc1c80f6fbbdd585254872ce (patch)
treeb5bc8ca5da565fcf1f4230cd7aa214901f63b634 /install/tools/ipa-replica-manage
parentaff6bc0e63377de50ce5dc0e024eb13669728f8f (diff)
downloadfreeipa.git-33c29033c84cef47bc1c80f6fbbdd585254872ce.tar.gz
freeipa.git-33c29033c84cef47bc1c80f6fbbdd585254872ce.tar.xz
freeipa.git-33c29033c84cef47bc1c80f6fbbdd585254872ce.zip
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
Diffstat (limited to 'install/tools/ipa-replica-manage')
-rwxr-xr-xinstall/tools/ipa-replica-manage7
1 files changed, 5 insertions, 2 deletions
diff --git a/install/tools/ipa-replica-manage b/install/tools/ipa-replica-manage
index c804ccb8..fc362f42 100755
--- a/install/tools/ipa-replica-manage
+++ b/install/tools/ipa-replica-manage
@@ -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):