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 694927 - Full replica push loses some entries with multi-valued RDNs
Summary: Full replica push loses some entries with multi-valued RDNs
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: 389-ds-base
Version: 6.1
Hardware: Unspecified
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Rich Megginson
QA Contact: Chandrasekar Kannan
URL:
Whiteboard:
Depends On: 693962
Blocks: 639035 389_1.2.8
TreeView+ depends on / blocked
 
Reported: 2011-04-08 22:57 UTC by Rich Megginson
Modified: 2015-01-04 23:47 UTC (History)
8 users (show)

Fixed In Version: 389-ds-base-1.2.8.1-1.el6
Doc Type: Bug Fix
Doc Text:
Clone Of: 693962
Environment:
Last Closed: 2011-05-19 12:43:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2011:0533 0 normal SHIPPED_LIVE new package: 389-ds-base 2011-05-18 17:57:44 UTC

Description Rich Megginson 2011-04-08 22:57:07 UTC
+++ This bug was initially created as a clone of Bug #693962 +++

Description of problem:

In 1.2.8 the components of multi-valued RDNs seem to be sorted, whereas in 1.2.5 the server kept them in the order they were in when the entry was created. When doing a full replica push from my 1.2.5 instance to 1.2.8 only those entries with multi-valued RDNs make it into 1.2.8 where the RDN components happen to be in the correct order.

Version-Release number of selected component (if applicable):

1.2.8.rc2, replicating from 1.2.5

How reproducible:

I have these two entries (amongst others) in the 1.2.5 instance:

dn: cn=Karsten+sn=Sperling,ou=People,dc=sky,dc=co,dc=nz
objectClass: inetOrgPerson
objectClass: top
objectClass: organizationalPerson
objectClass: person
cn: Karsten
sn: Sperling

dn: sn=Doe+cn=John,ou=People,dc=sky,dc=co,dc=nz
objectClass: inetOrgPerson
objectClass: top
objectClass: organizationalPerson
objectClass: person
cn: John
sn: Doe

After doing a full replica push to the 1.2.8 instance, only the first one of those is present in the 1.2.8 instance, the John Doe entry is missing.

If the John Doe entry is imported directly into the 1.2.8 instance, the DN is normalized to cn=John+sn=Doe,ou=People,dc=sky,dc=co,dc=nz. It seems the absence of this normalization step during the full replica initialization is what's causing this issue.

--- Additional comment from rmeggins on 2011-04-08 14:02:01 EDT ---

Created attachment 490848 [details]
0001-Bug-693962-Full-replica-push-loses-some-entries-with.patch

--- Additional comment from rmeggins on 2011-04-08 14:05:37 EDT ---

Created attachment 490849 [details]
0001-Bug-693962-Full-replica-push-loses-some-entries-with.patch

--- Additional comment from rmeggins on 2011-04-08 18:56:42 EDT ---

To ssh://git.fedorahosted.org/git/389/ds.git
   f9237d6..a82b8f0  389-ds-base-1.2.8 -> 389-ds-base-1.2.8
commit 54b95201cfc274c72e2364f49fc21b8a8e8fa688
Author: Rich Megginson <rmeggins>
Date:   Fri Apr 8 11:55:27 2011 -0600
   47e725d..2472169  master -> master
commit 2472169b3e077ff379812f9e91f439ce1e4edffb
Author: Rich Megginson <rmeggins>
Date:   Fri Apr 8 11:55:27 2011 -0600
    Reviewed by: nhosoi (Thanks!)
    Branch: master
    Fix Description: The code in _entryrdn_insert_key was assuming the srdn
    passed in was already normalized.  This is not true in some cases where
    the data is coming from a source of old data such as replication with an
    older server.  The solution is to make sure the rdn code always
    normalizes the code using slapi_dn_normalize_case_ext() instead of
    slapi_dn_normalize_case() which now doesn't do any normalization, it just
    converts the given string to lower case.  I added a function
    normalize_case_helper() to return a normalized dn as a copy or in place
    depending on the arguments.
    Tested with gdb - stepped through and verified the char arrays are correctly
    replaced, and copy values are correctly assigned.
    Used valgrind with online import to verify no leaks or errors.
    Exported a netscaperoot ldif from an older 1.2.8 server and imported with
    the new code.  Verified that the dbscan -f entryrdn.db4 output was
    identical between the two.
    Platforms tested: RHEL6 x86_64
    Flag Day: no
    Doc impact: no

Comment 5 Rich Megginson 2011-05-02 15:31:16 UTC
To reproduce:
1) set up replication - master -> consumer
2) add the following entry to the master:
dn: sn=Doe+cn=John,<your suffix here>
objectClass: inetOrgPerson
objectClass: top
objectClass: organizationalPerson
objectClass: person
cn: John
sn: Doe

3) wait for replication to occur
4) verify that the entry is on the consumer

Comment 6 Amita Sharma 2011-05-02 17:29:40 UTC
Master - 20100
Slave - 20102

[root@rhel61-ds90-amita ~]# ldapmodify -x -h localhost -p 20100 -D "cn=Directory Manager" -w Secret123 << EOF
> dn: sn=Doe+cn=John,ou=people,dc=replsuffix,dc=com
> changetype: add
> objectClass: inetOrgPerson
> objectClass: top
> objectClass: organizationalPerson
> objectClass: person
> cn: John
> sn: Doe
> EOF
adding new entry "sn=Doe+cn=John,ou=people,dc=replsuffix,dc=com"

[root@rhel61-ds90-amita ~]# ldapsearch -h localhost -p 20100 -D "cn=Directory Manager" -w Secret123 -b "ou=people,dc=replsuffix,dc=com"
# extended LDIF
#
# LDAPv3
# base <ou=people,dc=replsuffix,dc=com> with scope subtree
# filter: (objectclass=*)
# requesting: ALL
#

# People, replsuffix.com
dn: ou=People,dc=replsuffix,dc=com
objectClass: top
objectClass: organizationalunit
ou: People

# John + Doe, People, replsuffix.com
dn: cn=John+sn=Doe,ou=People,dc=replsuffix,dc=com
objectClass: inetOrgPerson
objectClass: top
objectClass: organizationalPerson
objectClass: person
cn: John
sn: Doe

# search result
search: 2
result: 0 Success

# numResponses: 3
# numEntries: 2

ldapsearch -h localhost -p 20102 -D "cn=Directory Manager" -w Secret123 -b "ou=people,dc=replsuffix,dc=com"
# extended LDIF
#
# LDAPv3
# base <ou=people,dc=replsuffix,dc=com> with scope subtree
# filter: (objectclass=*)
# requesting: ALL
#

# People, replsuffix.com
dn: ou=People,dc=replsuffix,dc=com
ou: People
objectClass: top
objectClass: organizationalunit

# John + Doe, People, replsuffix.com
dn: cn=John+sn=Doe,ou=People,dc=replsuffix,dc=com
objectClass: inetOrgPerson
objectClass: top
objectClass: organizationalPerson
objectClass: person
cn: John
sn: Doe

# search result
search: 2
result: 0 Success

# numResponses: 3
# numEntries: 2
 
Entry got replicated without crash. Bug is VERIFIED.

Comment 7 errata-xmlrpc 2011-05-19 12:43:11 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2011-0533.html


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