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/ipa_restore.py | |
parent | a730b6e7b5e4eca754022fd3e0112ef597888c3b (diff) | |
download | freeipa.git-fe3ba33d263a985f12c6b7b1ec342cde2babd830.tar.gz freeipa.git-fe3ba33d263a985f12c6b7b1ec342cde2babd830.tar.xz freeipa.git-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/ipa_restore.py')
-rw-r--r-- | ipaserver/install/ipa_restore.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/ipaserver/install/ipa_restore.py b/ipaserver/install/ipa_restore.py index 04d42100..760da0ba 100644 --- a/ipaserver/install/ipa_restore.py +++ b/ipaserver/install/ipa_restore.py @@ -373,7 +373,10 @@ class Restore(admintool.AdminTool): services_cns = [s.single_value('cn') for s in services] - hosts = repl.find_ipa_replication_agreements() + host_entries = repl.find_ipa_replication_agreements() + hosts = [rep.single_value('nsds5replicahost', None) + for rep in host_entries] + for host in hosts: self.log.info('Disabling replication agreement on %s to %s' % (master, host)) repl.disable_agreement(host) @@ -385,7 +388,9 @@ class Restore(admintool.AdminTool): except Exception, e: self.log.critical("Unable to disable agreement on %s: %s" % (master, e)) - hosts = repl.find_ipa_replication_agreements() + host_entries = repl.find_ipa_replication_agreements() + hosts = [rep.single_value('nsds5replicahost', None) + for rep in host_entries] for host in hosts: self.log.info('Disabling CA replication agreement on %s to %s' % (master, host)) repl.hostnames = [master, host] |