Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 2167746

Summary: Creation of a new instance fails when using custom directories.
Product: Red Hat Directory Server Reporter: Têko Mihinto <tmihinto>
Component: DocumentationAssignee: Evgenia Martynyuk <emartyny>
Documentation sub component: DDF QA Contact:
Status: CLOSED MIGRATED Docs Contact:
Severity: medium    
Priority: high CC: abobrov, idm-ds-dev-bugs, jpetrini, mreynolds, musoni, progier, radrao, rhel-docs, tbordaz, vashirov
Version: 11.6Keywords: Triaged
Target Milestone: DS12.3   
Target Release: dirsrv-12.3   
Hardware: x86_64   
OS: Linux   
Whiteboard: sync-to-jira
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-06-26 13:46:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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:

Comment 10 Viktor Ashirov 2024-06-26 13:46:12 UTC
This BZ has been automatically migrated to Red Hat Issue Tracker https://issues.redhat.com/browse/DIRSRV-32. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated. Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.

Comment 11 Red Hat Bugzilla 2024-10-25 04:25:04 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days