[Freeipa-devel] [PATCH 0058] ipa-restore: check whether DS is running before attempting connection

Alexander Bokovoy abokovoy at redhat.com
Tue Aug 18 11:16:27 UTC 2015


On Tue, 18 Aug 2015, Martin Babinsky wrote:
>https://fedorahosted.org/freeipa/ticket/4838
>
>-- 
>Martin^3 Babinsky

>From d86aae6c3fef4dea1afbbdbacbc978afbbfa5fcf Mon Sep 17 00:00:00 2001
>From: Martin Babinsky <mbabinsk at redhat.com>
>Date: Tue, 18 Aug 2015 12:47:46 +0200
>Subject: [PATCH] ipa-restore: check whether DS is running before attempting
> connection
>
>https://fedorahosted.org/freeipa/ticket/4838
>---
> ipaserver/install/ipa_restore.py | 7 +++++++
> 1 file changed, 7 insertions(+)
>
>diff --git a/ipaserver/install/ipa_restore.py b/ipaserver/install/ipa_restore.py
>index 65cb49355a0567446debe9c367aa3c1bc5a12e1c..b69ea90001a6fd03d0fddde8844870d1aa9c3704 100644
>--- a/ipaserver/install/ipa_restore.py
>+++ b/ipaserver/install/ipa_restore.py
>@@ -410,6 +410,13 @@ class Restore(admintool.AdminTool):
>         '''
>         Create an ldapi connection and bind to it using autobind as root.
>         '''
>+        instance_name = installutils.realm_to_serverid(api.env.realm)
>+
>+        if not services.knownservices.dirsrv.is_running(instance_name):
>+            raise admintool.ScriptError(
>+                "directory server instance is not running/configured"
>+            )
>+
>         if self._conn is not None:
>             return self._conn
> 
ACK.

-- 
/ Alexander Bokovoy




More information about the Freeipa-devel mailing list