summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ipaserver/install/ldapupdate.py6
-rw-r--r--ipaserver/install/plugins/updateclient.py3
2 files changed, 9 insertions, 0 deletions
diff --git a/ipaserver/install/ldapupdate.py b/ipaserver/install/ldapupdate.py
index 6bed046d2..47f0399b9 100644
--- a/ipaserver/install/ldapupdate.py
+++ b/ipaserver/install/ldapupdate.py
@@ -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
diff --git a/ipaserver/install/plugins/updateclient.py b/ipaserver/install/plugins/updateclient.py
index 7566b6cd8..8f5c5b5fd 100644
--- a/ipaserver/install/plugins/updateclient.py
+++ b/ipaserver/install/plugins/updateclient.py
@@ -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:
OSZAR »