Bug 975380

Summary: Unable to search on domain for users with some search options.
Product: Red Hat Enterprise Virtualization Manager Reporter: Ondra Machacek <omachace>
Component: ovirt-engineAssignee: Ravi Nori <rnori>
Status: CLOSED UPSTREAM QA Contact: Ondra Machacek <omachace>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.2.0CC: acathrow, iheim, jkt, lpeer, pstehlik, Rhev-m-bugs, yeylon, yzaslavs
Target Milestone: ---Keywords: Reopened, Triaged
Target Release: 3.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: is7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-16 09:05:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ondra Machacek 2013-06-18 10:20:42 UTC
Description of problem:
Search failed, when try to search user on domain with special keyword.

Version-Release number of selected component (if applicable):
3.2.1-0.31.el6ev (sf18)

How reproducible:
always

Steps to Reproduce:
curl -k -X GET -H "Accept: application/xml" -H "Content-Type: application/xml" -u admin@internal:****** "$URL/domains/72686576-2e6c-6162-2e65-6e672e627271/users?search=lastname%3Dyourlsatname"

Actual results:
<fault>
    <reason>Operation Failed</reason>
    <detail>Failed to run LDAP query, please check server logs for more info.</detail>
</fault>

Expected results:
Search is done without error.

Additional info:
This happens when user search by lastname, department and title.

Engine log:
2013-06-18 12:14:10,585 INFO  [org.ovirt.engine.core.bll.LoginUserCommand] (ajp-/127.0.0.1:8702-5) Running command: LoginUserCommand internal: false.
2013-06-18 12:14:10,594 WARN  [org.ovirt.engine.core.compat.backendcompat.PropertyInfo] (ajp-/127.0.0.1:8702-5) Unable to get value of property: glusterVolume for class org.ovirt.engine.core.bll.LoginUserCommand
2013-06-18 12:14:10,594 WARN  [org.ovirt.engine.core.compat.backendcompat.PropertyInfo] (ajp-/127.0.0.1:8702-5) Unable to get value of property: vds for class org.ovirt.engine.core.bll.LoginUserCommand
2013-06-18 12:14:10,597 WARN  [org.ovirt.engine.core.bll.GetConfigurationValueQuery] (ajp-/127.0.0.1:8702-5) calling GetConfigurationValueQuery (ApplicationMode) with null version, using default general for version
2013-06-18 12:14:10,620 ERROR [org.ovirt.engine.core.bll.adbroker.LDAPTemplateWrapper] (ajp-/127.0.0.1:8702-5) Error in running LDAP query. BaseDN is , filter is (&(sAMAccountType=805306368) ($SN=vdcadmin)). Exception message is: invalid attribute description; nested exception is javax.naming.directory.InvalidSearchFilterException: invalid attribute description; remaining name ''
2013-06-18 12:14:10,622 ERROR [org.ovirt.engine.core.bll.adbroker.DirectorySearcher] (ajp-/127.0.0.1:8702-5) Failed ldap search server LDAP://dc-01.rhev.lab.eng.brq.redhat.com:389 using user vdcadmin.ENG.BRQ.REDHAT.COM due to invalid attribute description; nested exception is javax.naming.directory.InvalidSearchFilterException: invalid attribute description; remaining name ''. We should try the next server
2013-06-18 12:14:10,622 ERROR [org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (ajp-/127.0.0.1:8702-5) Operation Failed: Failed to run LDAP query, please check server logs for more info.
2013-06-18 12:14:10,626 INFO  [org.ovirt.engine.core.bll.LogoutUserCommand] (ajp-/127.0.0.1:8702-5) [4bb96936] Running command: LogoutUserCommand internal: false.
2013-06-18 12:14:10,630 WARN  [org.ovirt.engine.core.compat.backendcompat.PropertyInfo] (ajp-/127.0.0.1:8702-5) Unable to get value of property: glusterVolume for class org.ovirt.engine.core.bll.LogoutUserCommand
2013-06-18 12:14:10,631 WARN  [org.ovirt.engine.core.compat.backendcompat.PropertyInfo] (ajp-/127.0.0.1:8702-5) Unable to get value of property: vds for class org.ovirt.engine.core.bll.LogoutUserCommand

Comment 1 Yair Zaslavsky 2013-07-01 14:16:34 UTC
Filter is wrong, should be SN, and not $SN.

Comment 3 Ondra Machacek 2013-08-13 11:53:34 UTC
Please fix it also for IPA, OpenLDAP and RHDS. For AD it is OK now.