Description of problem: Need to backport fix from issue 5353 - CLI - dsconf backend export breaks with multiple backends https://github.com/389ds/389-ds-base/issues/5353 https://github.com/389ds/389-ds-base/commit/93ff55814ef6a564976aa4c0c5623db0f1a543d8 into RHDS-11.5 "regression" / works in RHDS-11.4 Version-Release number of selected component (if applicable): RHDS-11.5 389-ds-base-1.4.3.29-3.module+el8dsrv+14615+a86efbbf.x86_64.rpm fails with RHDS-11.5 / 389-ds-base-1.4.3.29-3.module+el8dsrv+14615+a86efbbf.x86_64 works with RHDS-11.4 / 389-ds-base-1.4.3.27-2.module+el8dsrv+12690+c6df6d1b.x86_64 How reproducible: on demand Steps to Reproduce: 1. have RHDS instance with multiple backends, for example, "archive" and a "userRoot" with a capital / upper case R dn: cn=o\3Darchive,cn=mapping tree,cn=config objectClass: top objectClass: extensibleObject objectClass: nsMappingTree cn: o=archive cn: o\=archive nsslapd-state: backend nsslapd-backend: archive dn: cn=o\3Dexample.test,cn=mapping tree,cn=config objectClass: top objectClass: extensibleObject objectClass: nsMappingTree cn: o=example.test cn: o\=example.test nsslapd-state: backend nsslapd-backend: userRoot 2. dsconf m1 backend export userRoot -U -l /var/lib/dirsrv/slapd-m1/ldif/userRoot.ldif Actual results: DEBUG: Allocate <class 'lib389.DirSrv'> with localhost:None DEBUG: open(): Connecting to uri ldap://localhost DEBUG: open(): bound as cn=directory manager DEBUG: Retrieving entry with [('',)] DEBUG: Retrieved entry [dn: vendorVersion: 389-Directory/1.4.3.29 B2022.087.1507 ] DEBUG: list filter = (&(objectclass=nsBackendInstance)) DEBUG: cn=archive,cn=ldbm database,cn=plugins,cn=config getVal('cn') DEBUG: cn=archive,cn=ldbm database,cn=plugins,cn=config getVal('nsslapd-suffix') DEBUG: Traceback (most recent call last): File "/usr/sbin/dsconf", line 138, in <module> result = args.func(inst, None, log, args) File "/usr/lib/python3.6/site-packages/lib389/cli_conf/backend.py", line 288, in backend_export dn = _search_backend_dn(inst, be_name) File "/usr/lib/python3.6/site-packages/lib389/cli_conf/backend.py", line 98, in _search_backend_dn if cn == del_be_name or str2dn(suffix) == str2dn(del_be_name): File "/usr/lib64/python3.6/site-packages/ldap/dn.py", line 52, in str2dn return ldap.functions._ldap_function_call(None,_ldap.str2dn,dn,flags) File "/usr/lib64/python3.6/site-packages/ldap/functions.py", line 55, in _ldap_function_call result = func(*args,**kwargs) ldap.DECODING_ERROR ERROR: Error: Expected results: Additional info: "regression": fails with RHDS-11.5 / 389-ds-base-1.4.3.29-3.module+el8dsrv+14615+a86efbbf.x86_64 works with RHDS-11.4 / 389-ds-base-1.4.3.27-2.module+el8dsrv+12690+c6df6d1b.x86_64
Build tested: Steps: 1) Created two backends dsconf -D "cn=Directory Manager" ldap://`hostname` backend create --suffix="dc=example,dc=net" --be-name="example" dsconf -D "cn=Directory Manager" ldap://`hostname` backend create --suffix="dc=example,dc=com" --be-name="userroot" 2) List backends so confirm # dsconf -D "cn=Directory Manager" ldap://`hostname` backend suffix list 3) Perform an export operation dsconf test backend export userroot -U -l /var/lib/dirsrv/slapd-test/ldif/userRoot.ldif The export task has finished successfully dsconf is not breaking, Marking it as VERIFIED.
Build Tested: 389-ds-base-1.4.3.31-5.module+el8dsrv+16686+3df5ff63.x86_64
Regression found when enabling replication, fixed upstream via https://github.com/389ds/389-ds-base/pull/5485
Verified bug with the following parameters: RHDS 11 package 389-ds-base-1.4.3.31-6.module+el8dsrv+16980+c4b9cd33 https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=2217285 Steps: 1) Created multiple backends dsconf -D "cn=Directory Manager" -w password ldap://`hostname` backend create --suffix="dc=example,dc=net" --be-name="example" dsconf -D "cn=Directory Manager" -w password ldap://`hostname` backend create --suffix="dc=example,dc=com" --be-name="userroot" dsconf -D "cn=Directory Manager" -w password ldap://`hostname` backend create --suffix="dc=example,dc=test" --be-name="testRoot"" 2) List backends to confirm dsconf -D "cn=Directory Manager" -w password ldap://`hostname` backend suffix list dc=example,dc=com (userroot) dc=example,dc=net (example) dc=example,dc=test (testroot) 3) Perform an export operation on each be dsconf localhost backend export userroot -U -l /var/lib/dirsrv/slapd-localhost/ldif/userRoot.ldif The export task has finished successfully dsconf localhost backend export example -U -l /var/lib/dirsrv/slapd-localhost/ldif/example.ldif The export task has finished successfully dsconf localhost backend export testRoot -U -l /var/lib/dirsrv/slapd-localhost/ldif/testRoot.ldif The export task has finished successfully Setting to verified
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 (redhat-ds:11 bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2022:7929