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

FW: Openldap search results varies with search base



 

Hi All,

 

We are searching with same filter but with two different search bases and we are seeing results to be different.

 

Case1: (working case)

Search filter: (cn=monitorsoapnode*)

Search base: o=itsmydomain.com

Search result:

cn=monitorsoapnode@np-m910-45-4,cn=soap nodes,o=system,cn=cordys,cn=ucloud,o=itsmydomain.com

cn=monitorsoapnode@ np-m910-87-8,cn=soap nodes,o=system,cn=cordys,cn=ucloud,o=itsmydomain.com

 

Case2: (not working case)

Search filter: (cn=monitorsoapnode*)

Search base: cn=ucloud,o=itsmydomain.com

Search result:

cn=monitorsoapnode@np-m910-45-4,cn=soap nodes,o=system,cn=cordys,cn=ucloud,o=itsmydomain.com

 

It is observed that with search base “o=system,cn=cordys,cn=ucloud,o=itsmydomain.com” we are getting the expected results.

We are seeing this behaviour with hdb database, but not with bdb. But we want to stick to hdb only.  Is there any workaround to fix the issue(something like changing the configuration settings)?

It is also observed that in both cases bdb_substring_candidates value is 2 but bdb_search_candidates  value is different.  I am not sure if this observation is relevant or not.

 

 

You can check the logs  for working and not working cases below. Please help.

 

########Not working case log ##################

<= send_search_entry: conn 1000 exit.

send_ldap_result: conn=1000 op=8 p=3

send_ldap_response: msgid=9 tag=101 err=0

ber_flush2: 14 bytes to sd 12

connection_get(12): got connid=1000

connection_read(12): checking for input on id=1000

ber_get_next

connection_get(12): got connid=1000

connection_read(12): checking for input on id=1000

ber_get_next

ber_get_next: tag 0x30 len 118 contents:

op tag 0x63, time 1409136356

ber_get_next

conn=1000 op=9 do_search

ber_scanf fmt ({miiiib) ber:

>>> dnPrettyNormal: <cn=ucloud,o=itsmydomain.com>

<<< dnPrettyNormal: <cn=ucloud,o=itsmydomain.com>, <cn=ucloud,o=itsmydomain.com>

ber_scanf fmt ({m) ber:

ber_scanf fmt (m) ber:

ber_scanf fmt ({M}}) ber:

=> get_ctrls

ber_scanf fmt ({m) ber:

=> get_ctrls: oid="2.16.840.1.113730.3.4.2" (noncritical)

<= get_ctrls: n=1 rc=0 err=""

=> hdb_search

bdb_dn2entry("cn=ucloud,o=itsmydomain.com")

search_candidates: base="cn=ucloud,o=itsmydomain.com" (0x00000002) scope=2

=> hdb_dn2idl("cn=ucloud,o=itsmydomain.com")

=> bdb_substring_candidates (cn)

=> key_read

<= bdb_index_read 6 candidates

=> key_read

<= bdb_index_read 33 candidates

=> key_read

<= bdb_index_read 3 candidates

=> key_read

<= bdb_index_read 17 candidates

=> key_read

<= bdb_index_read 6 candidates

=> key_read

<= bdb_index_read 18 candidates

<= bdb_substring_candidates: 2, first=267, last=198029

bdb_search_candidates: id=1 first=267 last=267

=> send_search_entry: conn 1000 dn="cn=monitorsoapnode@np-m910-45-4,cn=soap nodes,o=system,cn=cordys,cn=ucloud,o=itsmydomain.com"

ber_flush2: 140 bytes to sd 12

<= send_search_entry: conn 1000 exit.

send_ldap_result: conn=1000 op=9 p=3

send_ldap_response: msgid=10 tag=101 err=0

ber_flush2: 14 bytes to sd 12

 

########Working case log ##################

<= send_search_entry: conn 1000 exit.

send_ldap_result: conn=1000 op=9 p=3

send_ldap_response: msgid=10 tag=101 err=0

ber_flush2: 14 bytes to sd 12

connection_get(12): got connid=1000

connection_read(12): checking for input on id=1000

ber_get_next

connection_get(12): got connid=1000

connection_read(12): checking for input on id=1000

ber_get_next

ber_get_next: tag 0x30 len 108 contents:

op tag 0x63, time 1409136444

ber_get_next

conn=1000 op=10 do_search

ber_scanf fmt ({miiiib) ber:

>>> dnPrettyNormal: <o=itsmydomain.com>

<<< dnPrettyNormal: <o=itsmydomain.com>, <o=itsmydomain.com>

ber_scanf fmt ({m) ber:

ber_scanf fmt (m) ber:

ber_scanf fmt ({M}}) ber:

=> get_ctrls

ber_scanf fmt ({m) ber:

=> get_ctrls: oid="2.16.840.1.113730.3.4.2" (noncritical)

<= get_ctrls: n=1 rc=0 err=""

=> hdb_search

bdb_dn2entry("o=itsmydomain.com")

search_candidates: base="o=itsmydomain.com" (0x00000001) scope=2

=> hdb_dn2idl("o=itsmydomain.com")

=> bdb_substring_candidates (cn)

=> key_read

<= bdb_index_read 6 candidates

=> key_read

<= bdb_index_read 33 candidates

=> key_read

<= bdb_index_read 3 candidates

=> key_read

<= bdb_index_read 17 candidates

=> key_read

<= bdb_index_read 6 candidates

=> key_read

<= bdb_index_read 18 candidates

<= bdb_substring_candidates: 2, first=267, last=198029

bdb_search_candidates: id=2 first=267 last=198029

=> send_search_entry: conn 1000 dn="cn=monitorsoapnode@np-m910-45-4,cn=soap nodes,o=system,cn=cordys,cn=ucloud,o=itsmydomain.com"

ber_flush2: 140 bytes to sd 12

<= send_search_entry: conn 1000 exit.

=> send_search_entry: conn 1000 dn="cn=monitorsoapnode@np-m910-87-8,cn=soap nodes,o=system,cn=cordys,cn=ucloud,o=itsmydomain.com"

ber_flush2: 140 bytes to sd 12

<= send_search_entry: conn 1000 exit.

send_ldap_result: conn=1000 op=10 p=3

send_ldap_response: msgid=11 tag=101 err=0

ber_flush2: 14 bytes to sd 12

 

Slapd config details you may be interested in are as follows

 

####### Config details start ######

database      hdb

suffix "o= itsmydomain.com"

rootdn "cn=Directory Manager,o= itsmydomain.com"

rootpw {SSHA}4tqAhskuvQm3wFz9EI3lqLI8pRRs6IfI

 

sizelimit 2000

index default pres,eq

index cn pres,eq,sub

index objectClass eq

index entryCSN,entryUUID eq

index authenticationuser pres,eq,sub

index osidentity pres,eq,sub

cachesize 5000

checkpoint 1024 10

 

####### Config details end ######

 

 

Regards,

Jegan.