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 918695 - db2index with -tattrname:type,type fails
Summary: db2index with -tattrname:type,type fails
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: 389-ds-base
Version: 7.0
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: rc
: ---
Assignee: Rich Megginson
QA Contact: Sankar Ramalingam
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-06 18:14 UTC by Nathan Kinder
Modified: 2020-09-13 20:17 UTC (History)
3 users (show)

Fixed In Version: 389-ds-base-1.3.1.2-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 09:28:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github 389ds 389-ds-base issues 453 0 None None None 2020-09-13 20:17:18 UTC

Description Nathan Kinder 2013-03-06 18:14:07 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/389/ticket/453

Run db2index and specify the types of indexes to create e.g.
db2index or db2index.pl -tattr:eq,sub
will not create the eq and sub indexes

db2index_add_indexed_attr should convert the comma delimited list of index types into multiple values for the nsIndexType attribute

Comment 1 Rich Megginson 2013-10-01 23:25:06 UTC
moving all ON_QA bugs to MODIFIED in order to add them to the errata (can't add bugs in the ON_QA state to an errata).  When the errata is created, the bugs should be automatically moved back to ON_QA.

Comment 3 Amita Sharma 2014-01-06 10:03:14 UTC
Hi Noriko,

I tried testing this with ::
[root@dhcp201-149 basic]# rpm -qa | grep 389
389-adminutil-1.1.15-3.fc19.1.x86_64
389-admin-1.1.31-1.fc19.2.x86_64
389-admin-console-doc-1.1.8-5.fc19.noarch
389-console-1.1.7-4.fc19.noarch
389-ds-base-1.3.1.6-12.el7.x86_64
389-admin-console-1.1.8-5.fc19.noarch
389-ds-console-doc-1.2.7-2.fc19.noarch
389-dsgw-1.1.10-1.fc19.x86_64
389-ds-base-libs-1.3.1.6-12.el7.x86_64
389-ds-console-1.2.7-2.fc19.noarch
389-ds-1.2.2-4.fc19.noarch

Test Case 1:: GOOD
===================
[root@dhcp201-149 ~]# db2index -n userRoot -t cn:eq,sub
[06/Jan/2014:14:26:58 +051800] - WARNING: Import is running with nsslapd-db-private-import-mem on; No other process is allowed to access the database
[06/Jan/2014:14:26:58 +051800] - check_and_set_import_cache: pagesize: 4096, pages: 479602, procpages: 53190
[06/Jan/2014:14:26:58 +051800] - Import allocates 767360KB import cache.
[06/Jan/2014:14:26:58 +051800] - userRoot: Indexing attribute: cn
[06/Jan/2014:14:26:58 +051800] - userRoot: Finished indexing.
[06/Jan/2014:14:26:58 +051800] - All database threads now stopped
[root@dhcp201-149 ~]# systemctl start dirsrv@dhcp201-149
[root@dhcp201-149 ~]# 

[root@dhcp201-149 ~]# db2index.pl -v -D "cn=Directory Manager" -w Secret123 -n userRoot -t sn:eq,sub
ldap_initialize( ldap://dhcp201-149.englab.pnq.redhat.com:389 )
Successfully added task entry "cn=db2index_2014_1_6_14_36_5, cn=index, cn=tasks, cn=config"

Test Case 2:: Difference in results for same thing
=====================================================
 [root@dhcp201-149 ~]# db2index -n userRoot -t cn:eq sub
[06/Jan/2014:15:00:28 +051800] - WARNING: Import is running with nsslapd-db-private-import-mem on; No other process is allowed to access the database
[06/Jan/2014:15:00:28 +051800] - check_and_set_import_cache: pagesize: 4096, pages: 479602, procpages: 53190
[06/Jan/2014:15:00:28 +051800] - Import allocates 767360KB import cache.
[06/Jan/2014:15:00:28 +051800] - userRoot: Indexing attribute: cn
[06/Jan/2014:15:00:28 +051800] - userRoot: Finished indexing.
[06/Jan/2014:15:00:28 +051800] - All database threads now stopped

[root@dhcp201-149 ~]# db2index.pl -v -D "cn=Directory Manager" -w Secret123 -n userRoot -t mail:eq sub
Usage: db2index.pl [-Z serverID] [-D rootdn] { -w password | -w - | -j filename } [-P protocol]
                   -n backendname [-t attributeName[:indextypes[:matchingrules]]] [-T vlvTag] [-v] [-h]

Test Case 3 :: Difference in results for same thing
=====================================================
[root@dhcp201-149 ~]# db2index -n userRoot -t givenname:eq, sub
[06/Jan/2014:15:05:35 +051800] - WARNING: Import is running with nsslapd-db-private-import-mem on; No other process is allowed to access the database
[06/Jan/2014:15:05:35 +051800] - check_and_set_import_cache: pagesize: 4096, pages: 479602, procpages: 53189
[06/Jan/2014:15:05:35 +051800] - Import allocates 767360KB import cache.
[06/Jan/2014:15:05:35 +051800] - userRoot: Indexing attribute: givenname
[06/Jan/2014:15:05:35 +051800] - userRoot: Finished indexing.
[06/Jan/2014:15:05:35 +051800] - All database threads now stopped

[root@dhcp201-149 ~]# db2index.pl -v -D "cn=Directory Manager" -w Secret123 -n userRoot -t mail:eq, sub
Usage: db2index.pl [-Z serverID] [-D rootdn] { -w password | -w - | -j filename } [-P protocol]
                   -n backendname [-t attributeName[:indextypes[:matchingrules]]] [-T vlvTag] [-v] [-h]

Conclusion ::  -t attribute:type, type AND -t attribute:type type works for db2index but not for db2index.pl
Questions ::
a. Which one is executing correctly , db2index or db2index.pl?
b. Should be logged as another bug or reopen this one?

Thanks,
Ami

Comment 4 Rich Megginson 2014-01-06 15:35:27 UTC
The problem with test case 2 and 3 is that db2index is not working, but it is not giving an error.  If you check, you will see that db2index -n userRoot -t cn:eq sub is not creating a substring index for cn.  Also, db2index -n userRoot -t givenname:eq, sub is not creating a substring index for givenname.

This is a new bug - better input argument validation and error messages for db2index and db2index.pl.

Comment 5 Amita Sharma 2014-01-07 07:56:39 UTC
Based on comment https://bugzilla.redhat.com/show_bug.cgi?id=918695#c4, Marking this bug as VERIFIED and opened  New Bug :: https://bugzilla.redhat.com/show_bug.cgi?id=1049190

Comment 6 Ludek Smid 2014-06-13 09:28:30 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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