diff options
author | Tomas Babej <tbabej@redhat.com> | 2013-04-08 14:09:16 +0200 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2013-04-16 10:05:43 -0400 |
commit | fe3ba33d263a985f12c6b7b1ec342cde2babd830 (patch) | |
tree | 8f9721727120ec0f6b8c28e9942cb752147eb514 /ipaserver/install/plugins | |
parent | a730b6e7b5e4eca754022fd3e0112ef597888c3b (diff) | |
download | freeipa-fe3ba33d263a985f12c6b7b1ec342cde2babd830.tar.gz freeipa-fe3ba33d263a985f12c6b7b1ec342cde2babd830.tar.xz freeipa-fe3ba33d263a985f12c6b7b1ec342cde2babd830.zip |
Update only selected attributes for winsync agreement
Trying to insert nsDS5ReplicatedAttributeListTotal and
nsds5ReplicaStripAttrs to winsync agreements caused upgrade errors.
With this patch, these attributes are skipped for winsync agreements.
Made find_ipa_replication_agreements() in replication.py more
corresponding to find_replication_agreements. It returns list of
entries instead of unicode strings now.
https://fedorahosted.org/freeipa/ticket/3522
Diffstat (limited to 'ipaserver/install/plugins')
-rw-r--r-- | ipaserver/install/plugins/fix_replica_agreements.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/ipaserver/install/plugins/fix_replica_agreements.py b/ipaserver/install/plugins/fix_replica_agreements.py index 472e50217..4f6569249 100644 --- a/ipaserver/install/plugins/fix_replica_agreements.py +++ b/ipaserver/install/plugins/fix_replica_agreements.py @@ -34,7 +34,8 @@ class update_replica_attribute_lists(PreUpdate): has all the required attributes so that we don't cause replication storms. """ - order=MIDDLE + + order = MIDDLE def execute(self, **options): # We need an IPAdmin connection to the backend @@ -44,9 +45,13 @@ class update_replica_attribute_lists(PreUpdate): repl = replication.ReplicationManager(api.env.realm, api.env.host, None, conn=conn) - entries = repl.find_replication_agreements() - self.log.debug("Found %d agreement(s)", len(entries)) - for replica in entries: + + # We need to update only IPA replica agreements, not winsync + ipa_replicas = repl.find_ipa_replication_agreements() + + self.log.debug("Found %d agreement(s)", len(ipa_replicas)) + + for replica in ipa_replicas: self.log.debug(replica.single_value('description', None)) self._update_attr(repl, replica, |