Do not crash when replica is unreachable in ipa-restore

https://fedorahosted.org/freeipa/ticket/4857

Reviewed-By: Martin Kosek <mkosek@redhat.com>
This commit is contained in:
Jan Cholasta 2015-01-27 07:38:06 +00:00 committed by Martin Kosek
parent 55b7eed77e
commit deb70d5b13

View File

@ -457,6 +457,7 @@ class Restore(admintool.AdminTool):
self.dirman_password)
except Exception, e:
self.log.critical("Unable to disable agreement on %s: %s" % (master, e))
continue
master_dn = DN(('cn', master), ('cn', 'masters'), ('cn', 'ipa'), ('cn', 'etc'), api.env.basedn)
try:
@ -481,6 +482,7 @@ class Restore(admintool.AdminTool):
self.dirman_password)
except Exception, e:
self.log.critical("Unable to disable agreement on %s: %s" % (master, e))
continue
host_entries = repl.find_ipa_replication_agreements()
hosts = [rep.single_value.get('nsds5replicahost')