Skip offline dse.ldif patching by default

The installer now stop and patches dse.ldif only when the option
--dirsrv-config-file is used. LDBM nsslapd-db-locks are increased in a
new step.

This speeds up installer by 4 or more seconds on a fast system.

Related: https://pagure.io/freeipa/issue/8521
Signed-off-by: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
This commit is contained in:
Christian Heimes 2020-09-24 15:11:09 +02:00
parent daec804961
commit 9eccaf6269

View File

@ -225,8 +225,11 @@ class DsInstance(service.Service):
self.step("creating directory server instance", self.__create_instance)
self.step("tune ldbm plugin", self.__tune_ldbm)
if self.config_ldif is not None:
self.step("stopping directory server", self.__stop_instance)
self.step("updating configuration in dse.ldif", self.__update_dse_ldif)
self.step(
"updating configuration in dse.ldif", self.__update_dse_ldif
)
self.step("starting directory server", self.__start_instance)
self.step("adding default schema", self.__add_default_schemas)
self.step("enabling memberof plugin", self.__add_memberof_module)
@ -652,6 +655,7 @@ class DsInstance(service.Service):
)
def restart(self, instance_name="", capture_output=True, wait=True):
if api.Backend.ldap2.isconnected():
api.Backend.ldap2.disconnect()
try:
super(DsInstance, self).restart(