Description of problem: vlvindex should not give an error message - either its a real error (not sure why) or the error message is spurious and should not be printed by default Steps to reproduce the problem: 1) Add these entries: dn: cn=roomNumber ou=Payroll dc=example dc=com, cn=userRoot, cn=ldbm database, cn=plugins, cn=config objectClass: top objectClass: vlvSearch cn: roomNumber ou=Payroll dc=example dc=com vlvBase: ou=Payroll, dc=example,dc=com vlvScope: 2 vlvFilter: (objectclass=*) dn: cn=by roomNumber,cn=roomNumber ou=Payroll dc=example dc=com, cn=userRoot, cn=ldbm database, cn=plugins, cn=config objectClass: top objectClass: vlvIndex cn: by roomNumber vlvSort: roomNumber 2) shutdown the server 3) vlvindex -n userRoot -T "by roomNumber ou=Accounting dc=example dc=com" [03/Nov/2008:18:16:05 -0800] - WARNING: Import is running with nsslapd-db-private-import-mem on; No other process is allowed to access the database [03/Nov/2008:18:16:05 -0800] - dblayer_instance_start: pagesize: 4096, pages: 1015077, procpages: 45632 [03/Nov/2008:18:16:05 -0800] - cache autosizing: import cache: 204800k [03/Nov/2008:18:16:05 -0800] - li_import_cache_autosize: 50, import_pages: 51200, pagesize: 4096 [03/Nov/2008:18:16:05 -0800] - userRoot: Indexing VLV: by roomNumber [03/Nov/2008:18:16:05 -0800] - warning: entrydn not indexed on 'ou=payroll,dc=example,dc=com' [03/Nov/2008:18:16:05 -0800] - userRoot: WARNING: Failed to fetch subtree lists: (-30989) DB_NOTFOUND: No matching key/data pair found [03/Nov/2008:18:16:05 -0800] - userRoot: Possibly the entrydn or ancestorid index is corrupted or does not exist. [03/Nov/2008:18:16:05 -0800] - userRoot: Attempting brute-force method instead. [03/Nov/2008:18:16:05 -0800] - userRoot: Finished indexing. [03/Nov/2008:18:16:05 -0800] - All database threads now stopped
3) vlvindex -n userRoot -T "by roomNumber ou=Accounting dc=example dc=com" should be 3) vlvindex -n userRoot -T "by roomNumber"
Created attachment 322519 [details] cvs diff ldap/servers/slapd/back-ldbm/ldif2ldbm.c File: ldap/servers/slapd/back-ldbm/ldif2ldbm.c Fix description: In ldbm_fetch_subtrees (ldif2ldbm.c), if the parent entry to be vlvindexed ('ou=payroll,dc=example,dc=com' in this example) does not exist, then vlvindex with the proposed code issues this warning but no further messages. warning: entrydn not indexed on 'ou=payroll,dc=example,dc=com'; entry ou=payroll,dc=example,dc=com may not be added to the database yet. If the parent entry exists (entry id 10 in this example), but no descendant entries to be vlvindexed do not, then vlvindex with the proposed code issues this warning but no further messages. warning: ancestorid not indexed on 10; possibly, the entry id 10 has no descendants yet.
Test case 1. 1) Add these entries (make sure no "ou=payroll, dc=example, dc=com" does not exist) dn: cn=roomNumber ou=Payroll dc=example dc=com, cn=userRoot, cn=ldbm database, cn=plugins, cn=config objectClass: top objectClass: vlvSearch cn: roomNumber ou=Payroll dc=example dc=com vlvBase: ou=Payroll, dc=example,dc=com vlvScope: 2 vlvFilter: (objectclass=*) dn: cn=by roomNumber,cn=roomNumber ou=Payroll dc=example dc=com, cn=userRoot, cn=ldbm database, cn=plugins, cn=config objectClass: top objectClass: vlvIndex cn: by roomNumber vlvSort: roomNumber 2) shutdown the server 3) vlvindex -n userRoot -T "by roomNumber" [...] [..] - userRoot: Indexing VLV: by roomnumber [..] - warning: entrydn not indexed on 'ou=payroll,dc=ex ample,dc=com'; entry ou=payroll,dc=example,dc=com may not be added to the databa se yet. [..] - userRoot: Finished indexing. [..] - libdb: userRoot/vlv#byroomnumber.db4: unable to f lush: No such file or directory [..] - All database threads now stopped
Test case 2. 1) Add these entries: dn: cn=roomNumber ou=Payroll dc=example dc=com, cn=userRoot, cn=ldbm database, cn=plugins, cn=config objectClass: top objectClass: vlvSearch cn: roomNumber ou=Payroll dc=example dc=com vlvBase: ou=Payroll, dc=example,dc=com vlvScope: 2 vlvFilter: (objectclass=*) dn: cn=by roomNumber,cn=roomNumber ou=Payroll dc=example dc=com, cn=userRoot, cn=ldbm database, cn=plugins, cn=config objectClass: top objectClass: vlvIndex cn: by roomNumber vlvSort: roomNumber 2) add an entry ou=payroll, dc=example, dc=com (make sure no child entries exist under ou=payroll, dc=example, dc=com) 3) shutdown the server 4) vlvindex -n userRoot -T "by roomNumber" [...] [..] - userRoot: Indexing VLV: by roomnumber [..] - warning: ancestorid not indexed on 10; possibly, the entry id 10 has no descendants yet. [..] - userRoot: Finished indexing.
Created attachment 322655 [details] cvs commit message Reviewed by Rich (Thank you!!) Checked in into CVS HEAD.
fix verified DS 8.1 RHEL 4 Test 1: [root@jennyv4 slapd-jennyv4]# ./vlvindex -n userRoot -T "by roomNumber" [01/Apr/2009:15:28:33 -0400] - WARNING: Import is running with nsslapd-db-private-import-mem on; No other process is allowed to access the database [01/Apr/2009:15:28:36 -0400] - dblayer_instance_start: pagesize: 4096, pages: 128583, procpages: 7028 [01/Apr/2009:15:28:36 -0400] - cache autosizing: import cache: 204800k [01/Apr/2009:15:28:36 -0400] - li_import_cache_autosize: 50, import_pages: 51200, pagesize: 4096 [01/Apr/2009:15:28:36 -0400] - userRoot: Indexing VLV: by roomNumber [01/Apr/2009:15:28:36 -0400] - info: entrydn not indexed on 'ou=payroll,dc=example,dc=com'; entry ou=payroll,dc=example,dc=com may not be added to the database yet. [01/Apr/2009:15:28:36 -0400] - userRoot: Finished indexing. [01/Apr/2009:15:28:36 -0400] - libdb: userRoot/vlv#byroomnumber.db4: unable to flush: No such file or directory [01/Apr/2009:15:28:36 -0400] - All database threads now stopped Test 2: [root@jennyv4 slapd-jennyv4]# ./vlvindex -n userRoot -T "by roomNumber" [01/Apr/2009:15:31:02 -0400] - WARNING: Import is running with nsslapd-db-private-import-mem on; No other process is allowed to access the database [01/Apr/2009:15:31:02 -0400] - dblayer_instance_start: pagesize: 4096, pages: 128583, procpages: 7021 [01/Apr/2009:15:31:02 -0400] - cache autosizing: import cache: 204800k [01/Apr/2009:15:31:02 -0400] - li_import_cache_autosize: 50, import_pages: 51200, pagesize: 4096 [01/Apr/2009:15:31:02 -0400] - userRoot: Indexing VLV: by roomNumber [01/Apr/2009:15:31:02 -0400] - warning: ancestorid not indexed on 10; possibly, the entry id 10 has no descendants yet. [01/Apr/2009:15:31:02 -0400] - userRoot: Finished indexing. [01/Apr/2009:15:31:02 -0400] - All database threads now stopped
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-2009-0455.html