aa60fb
From 431f42703acfb2f22c034a336277dcb2c320928a Mon Sep 17 00:00:00 2001
aa60fb
From: Simo Sorce <simo@redhat.com>
aa60fb
Date: Tue, 4 Aug 2015 10:15:36 -0400
aa60fb
Subject: [PATCH] Insure the admin_conn is disconnected on stop
aa60fb
aa60fb
If we stop or restart the server insure admin_conn gets reset or other
aa60fb
parts may fail to properly connect/authenticate
aa60fb
aa60fb
Signed-off-by: Simo Sorce <simo@redhat.com>
aa60fb
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
aa60fb
---
aa60fb
 ipaserver/install/dsinstance.py | 7 +++++++
aa60fb
 1 file changed, 7 insertions(+)
aa60fb
aa60fb
diff --git a/ipaserver/install/dsinstance.py b/ipaserver/install/dsinstance.py
aa60fb
index 7044782bac8068f7470b62bd7489b5319269b119..cadf9ccbe8ed0a20813af3fd671b18942a918b0b 100644
aa60fb
--- a/ipaserver/install/dsinstance.py
aa60fb
+++ b/ipaserver/install/dsinstance.py
aa60fb
@@ -478,7 +478,14 @@ class DsInstance(service.Service):
aa60fb
             # Does not apply with newer DS releases
aa60fb
             pass
aa60fb
 
aa60fb
+    def stop(self, *args, **kwargs):
aa60fb
+        if self.admin_conn:
aa60fb
+            self.ldap_disconnect()
aa60fb
+        super(DsInstance, self).stop(*args, **kwargs)
aa60fb
+
aa60fb
     def restart(self, instance=''):
aa60fb
+        if self.admin_conn:
aa60fb
+            self.ldap_disconnect()
aa60fb
         try:
aa60fb
             super(DsInstance, self).restart(instance)
aa60fb
             if not is_ds_running(instance):
aa60fb
-- 
aa60fb
2.5.0
aa60fb