upgrade: ldap conn management

Clean up unnecessary starts/stops of DS and unnescessary attributes.
If the DS is running, establish an LDAP connection and properly close
it.

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

Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
Tomas Krizek
2016-11-22 16:17:27 +01:00
committed by Martin Basti
parent 68295bf8cf
commit 0914fc6a60
3 changed files with 3 additions and 22 deletions
+2 -1
View File
@@ -96,8 +96,9 @@ class IPAUpgrade(service.Service):
def __stop_instance(self):
"""Stop only the main DS instance"""
if api.Backend.ldap2.isconnected():
api.Backend.ldap2.disconnect()
super(IPAUpgrade, self).stop(self.serverid)
api.Backend.ldap2.disconnect()
def create_instance(self):
ds_running = super(IPAUpgrade, self).is_running()