PDA

View Full Version : Odd ypserv behavior



ej2catz
23rd May 2006, 07:53 PM
I'm having an odd problem with my NIS master...a couple actually, but I'll start with the more vexing of the two.

I'm running FC4 on AMD64 and was having trouble with the NIS implementation so I thought I'd try the FC5 version (starting with the src RPM, building and installing).

The problem I have is that when I update the source files and cd /var/yp; make, the maps get updated but ypserv doesn't start using them. Or. more correctly, match requests to ypserv don't return the new information. ypcat does. If I restart ypserv it's fine.

I've peeked at the source and it looks like it maintains a cache of opened file handles for the various map files. But as far as I can tell, there is _nothing_ that will make it flush this cache short of restarting the daemon. I've confirmed this is causing the issue by using lsof to verify that the old maps are still open even though they've been deleted:

[root@tools yp]# lsof /var | grep ypserv
ypserv 6748 root cwd DIR 8,18 4096 5308417 /var/yp
ypserv 6748 root 3uW REG 8,18 5 15794197 /var/run/ypserv.pid
ypserv 6748 root 7r REG 8,18 98304 5308457 /var/yp/biocomp/services.byservicename
ypserv 6748 root 8r REG 8,18 123579 5308452 /var/yp/biocomp/passwd.byname (deleted)
ypserv 6748 root 9r REG 8,18 118784 5308442 /var/yp/biocomp/hosts.byname
ypserv 6748 root 10r REG 8,18 15074 5308429 /var/yp/biocomp/group.byname
ypserv 6748 root 11r REG 8,18 123164 5308459 /var/yp/biocomp/passwd.byuid (deleted)
ypserv 6748 root 12r REG 8,18 12709 5308454 /var/yp/biocomp/netgroup
ypserv 6748 root 13r REG 8,18 61440 5308449 /var/yp/biocomp/hosts.byaddr
ypserv 6748 root 14r REG 8,18 98620 5308482 /var/yp/biocomp/shadow.byname
ypserv 6748 root 15r REG 8,18 14980 5308437 /var/yp/biocomp/group.bygid
ypserv 6748 root 16r REG 8,18 50290 5308475 /var/yp/biocomp/services.byname

I could rebuild it with the filehandle cache turned off, but I don't think I'd like the performance. can anyone offer a suggestion?