mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-09-03 20:52:56 -05:00
Fix upgrade: do not use invalid ldap connection
Ticket: https://fedorahosted.org/freeipa/ticket/4670 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
This commit is contained in:
committed by
Petr Vobornik
parent
9335552418
commit
730f33680b
@@ -889,3 +889,9 @@ class LDAPUpdate:
|
||||
self._run_updates(updates)
|
||||
|
||||
return self.modified
|
||||
|
||||
def close_connection(self):
|
||||
"""Close ldap connection"""
|
||||
if self.conn:
|
||||
self.conn.unbind()
|
||||
self.conn = None
|
||||
|
||||
@@ -122,6 +122,9 @@ class updateclient(backend.Executioner):
|
||||
for update in self.order(updatetype):
|
||||
(restart, apply_now, res) = self.run(update.name, **kw)
|
||||
if restart:
|
||||
# connection has to be closed before restart, otherwise
|
||||
# ld instance will try to reuse old non-valid connection
|
||||
ld.close_connection()
|
||||
self.restart(dm_password, live_run)
|
||||
|
||||
if apply_now:
|
||||
|
||||
Reference in New Issue
Block a user