Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1417342

Summary: schema reload task picks up schema when the validation fails.
Product: Red Hat Enterprise Linux 7 Reporter: Noriko Hosoi <nhosoi>
Component: 389-ds-baseAssignee: Noriko Hosoi <nhosoi>
Status: CLOSED WORKSFORME QA Contact: Viktor Ashirov <vashirov>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 7.3CC: mreynolds, nkinder, rmeggins
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-10-02 19:18:17 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Noriko Hosoi 2017-01-28 02:16:42 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/389/ticket/49092

Note: found in debugging/testing ticket 47973.

Steps:

cat > /path/to/99user.ldif << EOF
dn: cn=schema
attributetypes: ( 8.9.10.11.12.13.14 NAME 'MozillaAttribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Mozilla Dummy Schema' )
objectclasses: ( 1.2.3.4.5.6.7 NAME 'MozillaObject' SUP top MUST ( objectclass $ cn ) MAY ( givenName $ sn $ MozillaAttribute ) X-ORIGIN 'user defined' )
EOF

schema-reload.pl -Z SERVERINST -D 'cn=directory manager' -W
<== expect to success

ldapsearch returns, e.g. "MAY ( givenName $ sn $ MozillaAttribute )"

cat > /path/to/98user.ldif << EOF
dn: cn=schema
attributetypes: ( 8.9.10.11.12.13.140 NAME 'MozillaAttribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Mozilla Dummy Schema' )
objectclasses: ( 1.2.3.4.5.6.70 NAME 'MoZiLLaOBJeCT' SUP top MUST ( objectclass $ cn ) MAY ( givenName $ sn $ MoZiLLaATTRiBuTe ) X-ORIGIN 'user defined' )
EOF
Note: the objectclasses and attributetypes have different OIDs.

schema-reload.pl -Z SERVERINST -D 'cn=directory manager' -W
<== expect to fail.  check it in the error log.

Although the reload failed, ldapsearch returns, e.g. 1.2.3.4.5.6.70 and "MAY ( givenName $ sn $ MoZiLLaATTRiBuTe )"

If you try to restart the server, it refuses to start due to the invalid schema.

The problem is observed on rhel6 as well as on the local build from the master branch.

Comment 1 mreynolds 2017-10-02 19:18:17 UTC
I can not reproduce this behavior on 389-ds-base-1.3.7 - adding CI test upstream.