Blob Blame History Raw
From 394e24cee7dfb8f1d860b936f7a865e8cace8c71 Mon Sep 17 00:00:00 2001
From: Jan Cholasta <jcholast@redhat.com>
Date: Tue, 27 Jan 2015 07:38:06 +0000
Subject: [PATCH] Do not crash when replica is unreachable in ipa-restore

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

Reviewed-By: Martin Kosek <mkosek@redhat.com>
---
 ipaserver/install/ipa_restore.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/ipaserver/install/ipa_restore.py b/ipaserver/install/ipa_restore.py
index 6de73e640d101a72aacc7ce73a6937c222da4ebb..efe3b9b1c0c10775b3a72b9d843924263526209a 100644
--- a/ipaserver/install/ipa_restore.py
+++ b/ipaserver/install/ipa_restore.py
@@ -458,6 +458,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:
@@ -482,6 +483,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')
-- 
2.1.0