[Date Prev][Date Next] [Chronological] [Thread] [Top]

(ITS#4616) Performing MODRDN on new entries causes them to disappear temporarily



Full_Name: Christopher J. Suleski
Version: 2.3.24
OS: Linux 2.6, Solaris 9
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (128.6.31.138)


Performing MODRDN on newly added entries cause those entries to "disappear"
until the server is restarted. This is the bug noted by my colleague on
openldap-devel: http://www.openldap.org/lists/openldap-devel/200607/msg00006.html

To reproduce the bug, start with the test005 test and:
1. create new entry "Sample Person" under "Alumni Association"
2. create new entry "Sample Person 2" under "James A Jones 1"
3. MODRDN "Sample Person 2" to new parent "Sample Person"
4. Search for "cn=Sample Person 2" OR subtree search under "cn=Sample Person"

The "Sample Person 2" does not come up. It's visible with slapcat and, if slapd
is restarted, it appears when searched for.

-- 

This is my terminal log of how to replicate this exactly:

# in directory 'tests' create/run the 005 test case
./run -b hdb -k test005

# Add Sample Person under Alumni Association
echo "dn: cn=Sample Person,ou=Alumni Association, ou=People, dc=example, dc=com
objectClass: person
cn: Sample Person
sn: Person" | ../clients/tools/ldapmodify -a  -P 3 -x -D
cn=Manager,dc=example,dc=com -h localhost -p 9011 -w secret

# Add Sample Person 2 under James A Jones 1 (under Alumni Association)
echo "dn: cn=Sample Person 2, cn=James A Jones 1,ou=Alumni Association,
ou=People, dc=example, dc=com
objectClass: person
cn: Sample Person 2
sn: Person" | ../clients/tools/ldapmodify -a  -P 3 -x -D
cn=Manager,dc=example,dc=com -h localhost -p 9011 -w secret

# Move Sample Person 2 under Sample Person
../clients/tools/ldapmodrdn -P 3 -x -D cn=Manager,dc=example,dc=com -h localhost
-p 9011 -w secret -s "cn=Sample Person, ou=Alumni Association, ou=People,
dc=example, dc=com" "cn=Sample Person 2, cn=James A Jones 1, ou=Alumni
Association, ou=People, dc=example, dc=com" "cn=Sample Person 2"

# Search for Sample Person 2... no matches
../clients/tools/ldapsearch -P 3 -x -D cn=Manager,dc=example,dc=com -h localhost
-p 9011 -w secret -b "ou=People,dc=example,dc=com" "cn=Sample Person 2"

# Search Sample Person subtree.. no children
../clients/tools/ldapsearch -P 3 -x -D cn=Manager,dc=example,dc=com -h localhost
-p 9011 -w secret -b "cn=Sample Person,ou=Alumni
Association,ou=People,dc=example,dc=com"

# Look in file.. it's there
../servers/slapd/slapd -T cat -b  dc=example,dc=com -f ./testrun/slapd.1.conf |
grep "Sample Person 2"

# Restart slapd
pkill slapd
sleep 1
../servers/slapd/slapd -s0 -f ./testrun/slapd.1.conf -h ldap://localhost:9011/
-d 261 &> /dev/null &
sleep 1

# Sample Person 2 is there now
../clients/tools/ldapsearch -P 3 -x -D cn=Manager,dc=example,dc=com -h localhost
-p 9011 -w secret -b "ou=People,dc=example,dc=com" "cn=Sample Person 2"