Bug 2167746 - Creation of a new instance fails when using custom directories.
Summary: Creation of a new instance fails when using custom directories.
Keywords:
Status: NEW
Alias: None
Product: Red Hat Directory Server
Classification: Red Hat
Component: 389-ds-base
Version: 11.6
Hardware: x86_64
OS: Linux
high
medium
Target Milestone: DS12.3
: dirsrv-12.3
Assignee: LDAP Maintainers
QA Contact: LDAP QA Team
Evgenia Martynyuk
URL:
Whiteboard: sync-to-jira
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-02-07 12:49 UTC by Têko Mihinto
Modified: 2023-07-28 08:51 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker IDMDS-3496 0 None None None 2023-07-28 08:51:39 UTC
Red Hat Knowledge Base (Solution) 7001436 0 None None None 2023-03-07 09:16:22 UTC

Description Têko Mihinto 2023-02-07 12:49:05 UTC
Description of problem:
Cannot create a new RHDS instance when using custom directories.

Version-Release number of selected component (if applicable):
$ cat /etc/redhat-release 
Red Hat Enterprise Linux release 8.7 (Ootpa)
$
$ rpm -qa | grep 389-ds
389-ds-base-1.4.3.31-11.module+el8dsrv+17815+4f95348d.x86_64
389-ds-base-libs-1.4.3.31-11.module+el8dsrv+17815+4f95348d.x86_64
cockpit-389-ds-1.4.3.31-11.module+el8dsrv+17815+4f95348d.noarch
$

How reproducible:
Always.

Steps to Reproduce:
1. Generate the installation file
2. Edit the installation file to use custom directories.
For instance:
$ grep "_dir = " /var/tmp/instance.inf
backup_dir = /var/tmp/ldap_server/bak/dirsrv/slapd-{instance_name}/bak
config_dir = /var/tmp/ldap_server/slapd-{instance_name}
db_dir = /var/tmp/ldap_server/slapd-{instance_name}/db
$

3. Try to create the new instance:
$ dscreate --verbose from-file /var/tmp/instance.inf
...
DEBUG: PASSED: network avaliability checking
DEBUG: READY: Beginning installation for test...
DEBUG: ACTION: Creating dse.ldif
INFO: Create file system structures ...
DEBUG: ACTION: creating /var/tmp/ldap_server/bak/dirsrv/slapd-test/bak
DEBUG: ACTION: creating /etc/dirsrv/slapd-test
DEBUG: ACTION: creating /var/tmp/ldap_server/slapd-test/db
DEBUG: ACTION: creating /dev/shm/slapd-test
DEBUG: ACTION: creating /var/lib/dirsrv/slapd-test/ldif
DEBUG: ACTION: creating /run/lock/dirsrv/slapd-test
DEBUG: ACTION: creating /var/log/dirsrv/slapd-test
DEBUG: ACTION: creating /run/dirsrv
DEBUG: b'CMD: systemctl enable dirsrv@test ; STDOUT:  ; STDERR: '
DEBUG: ACTION: Creating certificate database is /etc/dirsrv/slapd-test
DEBUG: Allocate <class 'lib389.DirSrv'> with None
DEBUG: Allocate <class 'lib389.DirSrv'> with /run/slapd-test.socket
DEBUG: Allocate <class 'lib389.DirSrv'> with localhost:41389
DEBUG: Allocate <class 'lib389.DirSrv'> with localhost:41389
DEBUG: list() test instance not found: missing /etc/dirsrv/slapd-test/dse.ldif

DEBUG: Instance failed to install, does not exist when expected
Traceback (most recent call last):
  File "/usr/sbin/dscreate", line 84, in <module>
    result = args.func(inst, log, args)
  File "/usr/lib/python3.6/site-packages/lib389/cli_ctl/instance.py", line 68, in instance_create
    if sd.create_from_inf(args.file):
  File "/usr/lib/python3.6/site-packages/lib389/instance/setup.py", line 540, in create_from_inf
    self.create_from_args(general, slapd, backends, self.extra)
  File "/usr/lib/python3.6/site-packages/lib389/instance/setup.py", line 676, in create_from_args
    self._install_ds(general, slapd, backends)
  File "/usr/lib/python3.6/site-packages/lib389/instance/setup.py", line 885, in _install_ds
    assert_c(ds_instance.exists(), "Instance failed to install, does not exist when expected")
  File "/usr/lib/python3.6/site-packages/lib389/utils.py", line 1274, in assert_c
    raise AssertionError(msg)
AssertionError: Instance failed to install, does not exist when expected
ERROR: Error: Instance failed to install, does not exist when expected
$

Actual results:
Failure to create a new instance.
Despite setting the config_dir to /var/tmp/ldap_server/slapd-{instance_name},
the installer tries to use the default value ( /etc/dirsrv/slapd-{instance_name} ).

Expected results:
The custom directories should be used.

Additional info:


Note You need to log in before you can comment on or make changes to this bug.