Bug 195501

Summary: lmtpd group lookups bypass nscd and cause high ldap or nis traffic/load
Product: Red Hat Enterprise Linux 4 Reporter: Mark Gargiulo <mgargiulo>
Component: cyrus-imapdAssignee: Tomas Janousek <tjanouse>
Status: CLOSED ERRATA QA Contact: Brian Brock <bbrock>
Severity: high Docs Contact:
Priority: high    
Version: 4.0CC: nate
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2007-0258 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-05-01 17:16:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 176344    
Attachments:
Description Flags
proposed patch none

Description Mark Gargiulo 2006-06-15 15:03:30 UTC
Description of problem:

The lmtpd process appears to do group lookups using getgrent() instead of
getgrnam() therefore bypassing using the local nscd cache, this causes a great
deal of network traffic and queries to ldap or nis servers. On a busy mail
server this causes mail to be slow and the load on the ldap server to rise.

There is a patch around to use a group.cache file, but it is not implemented in
our release.


Version-Release number of selected component (if applicable):

cyrus-imapd-2.2.12-3.RHEL4.1

How reproducible:

Instantly noticable in our environment when using ldap.


Steps to Reproduce:
1. Change auth mechanism to ldap client
2. restart cyrus-imapd
3. Watch network traffic and ldap queries to ldap server
  
Actual results:


Expected results:


Additional info:

I think the best work around would be to get cyrus to use nscd thereby reducing
the number or queries to the ldap server. I tried using "ldap_sasl: 0" in
/etc/imapd.conf, but this had little effect.

Comment 5 RHEL Program Management 2006-08-18 15:29:13 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 7 Ben Levenson 2006-09-06 02:00:59 UTC
(In reply to comment #1)
> This bug is seriously effecting our internal infrastructure AFAIK... Adding to
> the RHEL 4.5 list. Peter, what are the chances this can be addressed?

Perhaps we can recruit some testing from IS. :)
+ qa_ack for rhel-4.5

Comment 8 Andrius Benokraitis 2006-09-06 14:50:31 UTC
Mark/Nate: Can you help QE in testing this?

Comment 9 Petr Rockai 2006-09-19 15:59:58 UTC
After investigating the issue, the proper solution is not a private caching 
scheme for cyrus (proposed patch above), but using getgrouplist library call 
instead of pulling down complete list of all groups. I have verified that nscd 
cache is used for this call properly. Now just need to write the patch and 
verify that it works correctly :).

Comment 10 Petr Rockai 2006-10-03 17:13:02 UTC
Created attachment 137671 [details]
proposed patch

Comment 12 Jan Lieskovsky 2006-11-20 16:30:20 UTC
Asking for feedback from reporter. There are now cyrus-imapd rpm packages
available (cyrus-imapd-2.2.12-7.RHEL4.*), so I would like to ask the reporter
to provide the feedback if the network traffic and queuries to ldap or
nis server improves with these new packages installed.

Or pls provide more configuration details so I can verify your problem
(and consequently it's solution :o))

Thanks






Comment 15 Mark Gargiulo 2007-01-25 15:24:03 UTC
I tested the patch supplied by Tomas Janousek and this seems to have fixed group
lookup issue in my test environment so many thanks.

Comment 16 Red Hat Bugzilla 2007-05-01 17:16:59 UTC
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 the 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/RHBA-2007-0258.html