From owner-freebsd-stable@FreeBSD.ORG Sat Jan 19 11:44:55 2008 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0BB6216A418 for ; Sat, 19 Jan 2008 11:44:55 +0000 (UTC) (envelope-from realbushman@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.152]) by mx1.freebsd.org (Postfix) with ESMTP id 70A7B13C43E for ; Sat, 19 Jan 2008 11:44:54 +0000 (UTC) (envelope-from realbushman@gmail.com) Received: by fg-out-1718.google.com with SMTP id 16so1519030fgg.35 for ; Sat, 19 Jan 2008 03:44:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:cc:message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer:sender; bh=bLYEWwvNBz6YUczM4zm4fJCezrLZ8mqNG3tZ57pb2Jg=; b=US5M/z5CRQatSKB8ALnZJd6gWbTc1jO6qujRgvV5k09QxWXSv/GZkCuFzhCE4CvnkfPJjX6maGZ957LshhPEq2dnhw9w2MwslpVhdues34jKuwnIZIn66m4OkLAmAZ0rG+Aat4DEPlmIrW4hJuIBwVZ4P6dhOkyDSlofDO8VG7U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=cc:message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer:sender; b=RhurVW7JTH18VlcK0jpYIIT6zFiSlI/P/+3su9ETt2DEN+W4JfLhsQ6sh+IrQa6155diofjZCXxlJTghEV6do9mBDaQWDkGPV9WZa6pqc2J4l+vcnLv/TRPoOZgk/IP4S1LJPd6rxdotcDgP9XxGi90+qSJo1zSrNc9E1tUAFos= Received: by 10.78.81.20 with SMTP id e20mr6200030hub.60.1200741439821; Sat, 19 Jan 2008 03:17:19 -0800 (PST) Received: from ?192.168.0.43? ( [195.161.235.42]) by mx.google.com with ESMTPS id i4sm2931570nfh.36.2008.01.19.03.17.17 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 19 Jan 2008 03:17:18 -0800 (PST) Message-Id: <242ACF9B-7B89-49F2-8F20-F2D51104574B@freebsd.org> From: Michael Bushkov To: Denis Barov In-Reply-To: <20080117185547.GA85161@sepulca.yandex.ru> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v915) Date: Sat, 19 Jan 2008 14:17:11 +0300 References: <20080117185547.GA85161@sepulca.yandex.ru> X-Mailer: Apple Mail (2.915) Sender: Michael Bushkov Cc: stable@freebsd.org Subject: Re: nscd again X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Jan 2008 11:44:55 -0000 Hi Denis, Several things: 1. You definitely can't use cache for *_compat sources. I mean lines like "group_compat: cache nis" aren't supported. 2. Cache should work ok with the configuration you've mentioned in your first example, i.e.: "group: cache compat". Just checking - why do you think that cache isn't working? The correct way to determine it is to perform the same query twice. During the first pass (when query is not cached), the request will be processed by NIS module and you'll have all the NIS-related stuff in the logs. On the second pass the request should be handled by scd module - and you shouldn't see any activity in NIS logs. It would be great to see the debug log (with nscd log turned on) separately - for the first and the second pass. It would help to find the error in nscd, if there is one. With best regards, Michael Bushkov On Jan 17, 2008, at 9:55 PM, Denis Barov wrote: > Hello! > > I found some strange behaviour of NIS/nscd when NIS in compat mode. In > /etc/nsswitch.conf I have: > > netgroup: cache compat > passwd: cache compat > group: cache compat > #group_compat: cache nis > #passwd_compat: cache nis > > in /etc/nscd.conf: > #nscd.conf > threads 16 > > enable-cache passwd yes > keep-hot-count passwd 20480 > positive-time-to-live passwd 36000 > > enable-cache group yes > keep-hot-count group 20480 > positive-time-to-live group 36000 > > enable-cache group_compat yes > keep-hot-count group_compat 20480 > positive-time-to-live group.byname 36000 > > enable-cache passwd_compat yes > keep-hot-count passwd_compat 20480 > positive-time-to-live passwd_compat 36000 > > enable-cache netgroup yes > keep-hot-count netgroup 20480 > positive-time-to-live netgroup 36000 > > > But, when I do some actions on NIS-client host (host with ypbind), > host > ignoring cached data. In ypserv debug log: > > ... > ypserv: retrieving next key, previous was: [XXX] > ypserv: result of lookup: key: [XXXXXXXXX] data: [XXXXXX:*:1168:] > ypserv: procedure ypproc_next called from XXX.XXX.XXX.XXX:739 > ypserv: client is referencing map "group.byname". > ypserv: retrieving next key, previous was: [XXXXXXXXXXX] > ypserv: result of lookup: key: [baytin] data: [XXXXXX:*:1220:] > ypserv: procedure ypproc_next called from XXX.XXX.XXX.XXX:739 > ypserv: client is referencing map "group.byname". > ypserv: retrieving next key, previous was: [XXXXXX] > ypserv: result of lookup: key: [XXXX] data: [XXXX:*:3012:] > ypserv: procedure ypproc_next called from XXX.XXX.XXX.XXX:739 > ypserv: client is referencing map "group.byname". > ypserv: retrieving next key, previous was: [XXXX] > ypserv: result of lookup: key: [XXX] data: [XXX:*:3021:] > ypserv: procedure ypproc_next called from XXX.XXX.XXX.XXX:739 > ypserv: client is referencing map "group.byname". > ypserv: retrieving next key, previous was: [XXX] > ypserv: result of lookup: key: [vereschagin] data: [XXXXXXXXXXX:*: > 3024:] > ypserv: procedure ypproc_next called from XXX.XXX.XXX.XXX:739 > ypserv: client is referencing map "group.byname". > ypserv: retrieving next key, previous was: [XXXXXXXXXXX] > ... > > If I set in nsswitch.conf: > netgroup: cache compat > passwd: cache compat > group: cache compat > group_compat: cache nis > passwd_compat: cache nis > > I have other errors: > > Jan 17 21:53:13 mfas002 sudo: NSSWITCH(nss_method_lookup): cache, > passwd_compat, setpwent, not found > Jan 17 21:53:15 mfas002 sudo: NSSWITCH(nss_method_lookup): cache, > group_compat, setgrent, not found > Jan 17 21:53:15 mfas002 sudo: NSSWITCH(nss_method_lookup): cache, > group_compat, getgrent_r, not found > Jan 17 21:53:15 mfas002 last message repeated 197 times > Jan 17 21:53:15 mfas002 sudo: NSSWITCH(nss_method_lookup): cache, > group_compat, endgrent, not found > Jan 17 21:53:15 mfas002 sudo: NSSWITCH(nss_method_lookup): cache, > passwd_compat, endpwent, not found > Jan 17 21:53:15 mfas002 sudo: NSSWITCH(nss_method_lookup): cache, > group_compat, endgrent, not found > > > Seems group_compat and passwd_compat databases can't operate with > cache > sourse. Is that true? > -- > Denis Barov | /"\ > Yandex WEB-Search Administration Team | \ / ASCII Ribbon Campaign > phone: : +7 (495) 739-70-00 add. 7154 | X NO HTML/RTF in e-mail > e-mail: dindin@yandex-team.ru | / \ NO Word docs in e-mail