389ds / 389-ds-base

The enterprise-class Open Source LDAP server for Linux
https://www.port389.org/
Other
211 stars 93 forks source link

nsslapd-db-home-directory - Allow setting this while running #3106

Closed 389-ds-bot closed 4 years ago

389-ds-bot commented 4 years ago

Cloned from Pagure issue: https://pagure.io/389-ds-base/issue/50047


Issue Description

Currently, nsslapd-db-home-directory is not allowed to be set when 389 is running:

# ldapmodify -x -D "cn=directory manager" -W <<EOF
> dn: cn=config,cn=ldbm database,cn=plugins,cn=config
> changetype: modify
> replace: nsslapd-db-home-directory
> nsslapd-db-home-directory: /dev/shm/ns-slapd-database-cache
>
> EOF
Enter LDAP Password:
modifying entry "cn=config,cn=ldbm database,cn=plugins,cn=config"
ldap_modify: Server is unwilling to perform (53)
        additional info: nsslapd-db-home-directory can't be modified while the server is running.

This conflicts with the documentation as well: https://access.redhat.com/documentation/en-us/red_hat_directory_server/10/html-single/performance_tuning_guide/#db-cache-on-ram-disk

Ideally, this setting is allowed to be configured but is one of the requires restart settings. Currently, you must stop dirsrv, manually add this to your dse.ldif and then start it.

Package Version and Platform

Operating System: CentOS 7

# rpm -qi 389-ds-base
Name        : 389-ds-base
Version     : 1.3.7.5
Release     : 28.el7_5
Architecture: x86_64
Install Date: Wed 10 Oct 2018 11:21:46 PM UTC
Group       : System Environment/Daemons
Size        : 5528112
License     : GPLv3+
Signature   : RSA/SHA256, Fri 28 Sep 2018 11:33:07 AM UTC, Key ID 24c6a8a7f4a80eb5
Source RPM  : 389-ds-base-1.3.7.5-28.el7_5.src.rpm
Build Date  : Wed 26 Sep 2018 06:26:30 PM UTC
Build Host  : x86-01.bsys.centos.org
Relocations : (not relocatable)
Packager    : CentOS BuildSystem <http://bugs.centos.org>
Vendor      : CentOS
URL         : https://www.port389.org/
Summary     : 389 Directory Server (base)
Description :
389 Directory Server is an LDAPv3 compliant server.  The base package includes
the LDAP server and command line utilities for server administration.

Steps to reproduce

  1. Install FreeIPA 4.5.4 which comes with 389-ds-base 1.3.7.5
  2. Attempt to add a custom nsslapd-db-home-directory
  3. Notice error as shown above

Actual results

Changing nsslapd-db-home-directory on a running dirsrv instance fails completely.

Expected results

nsslapd-db-home-directory should be updated but only be used after restart. Even more ideally would be to not require the restart at all but, I'm sure that's way more complicated and unnecessary to implement.

389-ds-bot commented 4 years ago

Comment from mreynolds (@mreynolds389) at 2018-12-20 17:58:25

Metadata Update from @mreynolds389:

389-ds-bot commented 4 years ago

Comment from firstyear (@Firstyear) at 2019-02-04 02:33:42

I don't think this should be set while running because this would break out bdb env, and really serves little utility. I thinkk this is an offline only operation.

@mmuehlfeldrh Can we fix this in the docs?

389-ds-bot commented 4 years ago

Comment from firstyear (@Firstyear) at 2019-03-12 03:24:29

Ping @mmuehlfeldrh or @mreynolds389 ?

389-ds-bot commented 4 years ago

Comment from mmuehlfeldrh at 2019-03-12 09:29:46

Sorry, I missed this. I updated the step of the procedure: https://access.redhat.com/documentation/en-us/red_hat_directory_server/10/html/performance_tuning_guide/tuning-db-cache#db-cache-on-ram-disk

I cannot update the metadata of this BZ. The Red Hat BZ number is 1687701.

389-ds-bot commented 4 years ago

Comment from firstyear (@Firstyear) at 2019-03-13 02:32:41

Awesome, thank you!

389-ds-bot commented 4 years ago

Comment from firstyear (@Firstyear) at 2019-03-13 02:32:41

Metadata Update from @Firstyear: