Skip to main content

Posts

Showing posts from January, 2013

openldap adding an index

We use ldap to store customer metadata like users, customers and other stuff. Right now each node has a ldap and we are trying to consolidate ldaps across different nodes. So I loaded one ldap with data from 20 nodes and some of the queries were taking 4000 msec.  So I saw that indexes were missing . I went to  slapd.conf  and  added index customerNumber,customerDomain,email   eq index customerName eq,sub I also updated the cache size to 4G in DB_CONFIG file set_cachesize   4 0 1 I restarted ldap and suddenly things were flying but something  was fishy as the new numbers for 100 threads was faster then previous 1 thread time for all operations. So I picked one query and ran it manually and found that a simple query like below was coming empty ldapsearch -x -H ldap://localhost:389 -b "dc=xxx,dc=com" "(&(objectclass=objuser)(email=kpatel@comcast1.net))"|grep email|more I removed the index and restarted ldap and same quer...

It seems people work less in december in US

  Traffic to my blog was down to 60% in december and I was worried what had changed but I am glad to see that its back to original level in 2nd week of January.  It seems people work less in December.

Fun to see bugs

Received this spam email today morning and first thing i saw that instead of image it had a path of "c:\users\Manoj". :)

LDAP wildcard search

I was able to make a LDAP query with wild card on a field username like (&(username=*kpatel)) but I wasnt able to make it on a field like (&(customername=*kpatel)) me and my teammate searched and finally found that username was inheriting from a super type uid and thats why it was working on it but customername was not. Luckily solution to the problem was to add a SUBSTR clause to enable wildcard match on a field in ldap schema. SUBSTR caseIgnoreSubstringsMatch