Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Jan 2008 21:55:47 +0300
From:      Denis Barov <dindin@yandex-team.ru>
To:        bushman@freebsd.org
Cc:        stable@freebsd.org
Subject:   nscd again
Message-ID:  <20080117185547.GA85161@sepulca.yandex.ru>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080117185547.GA85161>