Bug 1598718 - import fails if backend name is "default"
Summary: import fails if backend name is "default"
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: 389-ds-base
Version: 7.7-Alt
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: mreynolds
QA Contact: RHDS QE
Marc Muehlfeld
Depends On:
TreeView+ depends on / blocked
Reported: 2018-07-06 09:59 UTC by German Parente
Modified: 2020-09-13 22:12 UTC (History)
5 users (show)

Fixed In Version: 389-ds-base-
Doc Type: Bug Fix
Doc Text:
Creating a Directory Server back end with the name *default* is now supported Previously, the name *default* was reserved in Directory Server. As a consequence, creating a back end named *default* failed. With this update, Directory Server no longer reserves this name, and administrators can create a back end named *default*.
Clone Of:
Last Closed: 2018-10-30 10:14:34 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Github 389ds 389-ds-base issues 2889 0 None None None 2020-09-13 22:12:17 UTC
Red Hat Product Errata RHSA-2018:3127 0 None None None 2018-10-30 10:15:20 UTC

Description German Parente 2018-07-06 09:59:58 UTC
Description of problem:

doing an import when the backend name is exactly "default" fails and imports only the root entry.

How reproducible: always.

Steps to Reproduce:

1. create a backend with name default:

dn: cn=secAuthority\3DDefault,cn=mapping tree,cn=config
cn: secAuthority=Default
objectClass: top
objectClass: extensibleObject
objectClass: nsMappingTree
nsslapd-state: backend
nsslapd-backend: default

dn: cn=default,cn=ldbm database,cn=plugins,cn=config
cn: default
objectClass: extensibleObject
objectClass: nsBackendInstance
objectClass: top
numSubordinates: 4
nsslapd-suffix: secAuthority=Default
nsslapd-cachesize: -1
nsslapd-cachememsize: 67108864
nsslapd-readonly: off
nsslapd-require-index: off
nsslapd-directory: /var/lib/dirsrv/slapd-nslcd/db/default
nsslapd-dncachememsize: 67108864

2. import this file:

cat mysec.ldif 
version: 1

# entry-id: 1
dn: secAuthority=Default
objectClass: top
secAuthority: Default

# entry-id: 2
dn: cn=Users,secAuthority=Default
objectClass: container
objectClass: top
cn: Users

Actual results:

[06/Jul/2018:05:58:54.155501053 -0400] - INFO - import_main_offline - import default: Beginning import job...
[06/Jul/2018:05:58:54.157457181 -0400] - INFO - import_main_offline - import default: Index buffering enabled with bucket size 76
[06/Jul/2018:05:58:54.358709382 -0400] - INFO - import_producer - import default: Processing file "/root/mysec.ldif"
[06/Jul/2018:05:58:54.361343422 -0400] - INFO - import_producer - import default: Finished scanning file "/root/mysec.ldif" (1 entries)
[06/Jul/2018:05:58:54.663126377 -0400] - INFO - import_monitor_threads - import default: Workers finished; cleaning up...
[06/Jul/2018:05:58:54.865608097 -0400] - INFO - import_monitor_threads - import default: Workers cleaned up.
[06/Jul/2018:05:58:54.868463718 -0400] - INFO - import_main_offline - import default: Cleaning up producer thread...
[06/Jul/2018:05:58:54.870880927 -0400] - INFO - import_main_offline - import default: Indexing complete.  Post-processing...
[06/Jul/2018:05:58:54.872821273 -0400] - INFO - import_main_offline - import default: Generating numsubordinates (this may take several minutes to complete)...
[06/Jul/2018:05:58:54.877320870 -0400] - INFO - import_main_offline - import default: Generating numSubordinates complete.
[06/Jul/2018:05:58:54.879220836 -0400] - INFO - ldbm_get_nonleaf_ids - import default: Gathering ancestorid non-leaf IDs...
[06/Jul/2018:05:58:54.881249929 -0400] - INFO - ldbm_get_nonleaf_ids - import default: Finished gathering ancestorid non-leaf IDs.
[06/Jul/2018:05:58:54.896250662 -0400] - ERR - ldbm_ancestorid_new_idl_create_index - Nothing to do to build ancestorid index
[06/Jul/2018:05:58:54.898235990 -0400] - INFO - ldbm_ancestorid_new_idl_create_index - import default: Created ancestorid index (new idl).
[06/Jul/2018:05:58:54.900606981 -0400] - INFO - import_main_offline - import default: Flushing caches...
[06/Jul/2018:05:58:54.902665707 -0400] - INFO - import_main_offline - import default: Closing files...
[06/Jul/2018:05:58:54.917758717 -0400] - INFO - dblayer_pre_close - All database threads now stopped
[06/Jul/2018:05:58:54.920131450 -0400] - INFO - import_main_offline - import default: Import complete.  Processed 1 entries in 0 seconds. (0.00 entries/sec)

Comment 4 mreynolds 2018-07-06 13:13:52 UTC
Upstream ticket:

Comment 5 mreynolds 2018-07-09 15:54:05 UTC
Fixed upstream

Comment 7 Viktor Ashirov 2018-07-23 16:24:51 UTC
# py.test -v ds/dirsrvtests/tests/suites/import/regression_test.py::test_import_be_default
===================================================================== test session starts =====================================================================
platform linux -- Python 3.6.3, pytest-3.6.3, py-1.5.4, pluggy-0.6.0 -- /opt/rh/rh-python36/root/usr/bin/python3
cachedir: .pytest_cache
metadata: {'Python': '3.6.3', 'Platform': 'Linux-3.10.0-922.el7.x86_64-x86_64-with-redhat-7.6-Maipo', 'Packages': {'pytest': '3.6.3', 'py': '1.5.4', 'pluggy': '0.6.0'}, 'Plugins': {'metadata': '1.7.0', 'html': '1.19.0'}}
nss: 3.36.0-5.el7_5
nspr: 4.19.0-1.el7_5
openldap: 2.4.44-18.el7
cyrus-sasl: 2.1.26-23.el7

rootdir: /mnt/tests/rhds/tests/upstream, inifile:
plugins: metadata-1.7.0, html-1.19.0
collected 1 item                                                                                                                                              

ds/dirsrvtests/tests/suites/import/regression_test.py::test_import_be_default PASSED                                                                    [100%]

================================================================== 1 passed in 19.28 seconds ==================================================================

Marking as VERIFIED.

Comment 11 errata-xmlrpc 2018-10-30 10:14:34 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


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