mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
install: add restart_dirsrv for directory server restarts
* Create a utility function to restart a directory server and
reconnect the api.Backend.ldap2 connection.
* Use restart_dirsrv instead of knownservices.dirsrv.restart to
ensure api.Backend.ldap2 is reconnected.
https://fedorahosted.org/freeipa/ticket/6461
Reviewed-By: Martin Basti <mbasti@redhat.com>
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
This commit is contained in:
committed by
Martin Basti
parent
e8aa2627c7
commit
e05bdeb6cf
@@ -35,8 +35,8 @@ from ipapython.ipa_log_manager import root_logger
|
||||
from ipapython import ipautil, ipaldap
|
||||
from ipapython.admintool import ScriptError
|
||||
from ipapython.dn import DN
|
||||
from ipaplatform import services
|
||||
from ipaplatform.paths import paths
|
||||
from ipaserver.install import installutils
|
||||
|
||||
if six.PY3:
|
||||
unicode = str
|
||||
@@ -130,7 +130,7 @@ def enable_replication_version_checking(realm, dirman_passwd):
|
||||
conn.modify_s(entry.dn, [(ldap.MOD_REPLACE, 'nsslapd-pluginenabled', 'on')])
|
||||
conn.unbind()
|
||||
serverid = "-".join(realm.split("."))
|
||||
services.knownservices.dirsrv.restart(instance_name=serverid)
|
||||
installutils.restart_dirsrv(serverid)
|
||||
else:
|
||||
conn.unbind()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user