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

Bug 1892453

Summary: RHDS Console fails to load schema data if there are additional parentheses.
Product: Red Hat Directory Server Reporter: Têko Mihinto <tmihinto>
Component: cockpit-389-dsAssignee: LDAP Maintainers <ldap-maint>
Status: CLOSED ERRATA QA Contact: RHDS QE <ds-qe-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 11.3CC: gkimetto, gpulido, jachapma, mreynolds, spichugi, tbordaz, vashirov
Target Milestone: DS11.3   
Target Release: dirsrv-11.3   
Hardware: x86_64   
OS: Linux   
Whiteboard: sync-to-jira
Fixed In Version: redhat-ds-11-8040020210326143715.45c09202 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-05-19 07:54:28 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 2020-10-28 19:45:32 UTC
Description of problem:
RHDS Console shows empty tables for the schema data.

Version-Release number of selected component (if applicable):
# cat /etc/redhat-release
Red Hat Enterprise Linux release 8.2 (Ootpa)
#
# rpm -qa | grep 389-ds
389-ds-base-1.4.2.12-3.module+el8dsrv+6923+6ab1d5c5.x86_64
389-ds-base-libs-1.4.2.12-3.module+el8dsrv+6923+6ab1d5c5.x86_64
cockpit-389-ds-1.4.2.12-3.module+el8dsrv+6923+6ab1d5c5.noarch
#

How reproducible:
Always.

Steps to Reproduce:
1. Stop the RHDS instance
2. Add a schema line containing parentheses in the X-ORIGIN information.
For instance:

attributetypes: ( 2.16.840.1.113730.3.1.604 NAME 'testName' DESC 'Sun ONE defined attribute type' EQUALITY 2.5.13.2 SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE NO-USER-MODIFICATION USAGE directoryOperation X-ORIGIN ( 'Sun Java(TM)' 'user defined' ) )

3. Start the instance
4. Click on the Schema tab in the Console. Tables are empty.
5. Things work fine if 'Sun Java(TM)' is changed to 'Sun Java'

Actual results:
Console doesn't load schema data.

Expected results:
Schema data should be loaded.

Additional info:
# dsconf --verbose -j ldapi://%2fvar%2frun%2fslapd-<INSTANCE>.socket schema list
DEBUG: The 389 Directory Server Configuration Tool
...
DEBUG: cn=schema get_attr_vals('objectClasses')
DEBUG: cn=schema get_attr_vals('attributeTypes')
DEBUG: list index out of range
Traceback (most recent call last):
  File "/usr/sbin/dsconf", line 134, in <module>
    result = args.func(inst, None, log, args)
  File "/usr/lib/python3.6/site-packages/lib389/cli_conf/schema.py", line 32, in list_all
    attributetype_elems = schema.get_attributetypes(json=json)
  File "/usr/lib/python3.6/site-packages/lib389/schema.py", line 390, in get_attributetypes
    return self._get_schema_objects(AttributeType, json=json)
  File "/usr/lib/python3.6/site-packages/lib389/schema.py", line 149, in _get_schema_objects
    obj_i['x_origin'] = vals[0]
IndexError: list index out of range
{"desc": "list index out of range"}#
#

Comment 1 mreynolds 2020-11-01 16:23:09 UTC
Could be the same issue as:

https://bugzilla.redhat.com/show_bug.cgi?id=1893296

Comment 2 Têko Mihinto 2020-11-02 08:11:51 UTC
Hi Mark,

You're right, the schema file in bug 1893296 contains two occurrences of "X-ORIGIN ( 'Sun Java(TM)'..."
Both bugs relate to the same issue. Please feel free to mark either of them as a duplicate.

Regards,
Têko.

Comment 3 mreynolds 2020-11-02 15:01:06 UTC
*** Bug 1893296 has been marked as a duplicate of this bug. ***

Comment 4 mreynolds 2020-11-03 22:27:37 UTC
Upstream ticket:

https://github.com/389ds/389-ds-base/issues/4415

Comment 13 Gilbert Kimetto 2021-04-13 15:52:59 UTC
[VERIFIED FIX:]

rpm -qa | grep 389-ds
389-ds-base-1.4.3.22-1.module+el8dsrv+10501+8ce33e95.x86_64
389-ds-base-libs-1.4.3.22-1.module+el8dsrv+10501+8ce33e95.x86_64
cockpit-389-ds-1.4.3.22-1.module+el8dsrv+10501+8ce33e95.noarch

Comment 14 Gilbert Kimetto 2021-04-15 13:46:36 UTC
Build tested:

cockpit-389-ds-1.4.3.22-1.module+el8dsrv+10501+8ce33e95.noarch
389-ds-base-1.4.3.22-1.module+el8dsrv+10501+8ce33e95.x86_64
389-ds-base-libs-1.4.3.22-1.module+el8dsrv+10501+8ce33e95.x86_64

Steps:
 
1. Load the Cockpit UI. The Server Settings tab is selected by default.
2. Add a schema line containing parentheses in the "X-ORIGIN" information.
2. Go to the Database tab.
   In the "schema attribute search" bar search letter p or k
4. Apprpriate results are displayed and no page crash.
4. Verified that the RH DS management page in cockpit is available and schema attribute 
   search returns results

Marking as VERIFIED

Comment 16 errata-xmlrpc 2021-05-19 07:54:28 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 (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/RHEA-2021:2038