Bug 28481

Summary: NFS locking (rpc.statd) broken with kernel 2.2.17-14 (workaround included)
Product: [Retired] Red Hat Linux Reporter: Philip Spencer <pspencer>
Component: nfs-utilsAssignee: Pete Zaitcev <zaitcev>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: high Docs Contact:
Priority: high    
Version: 7.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-02-20 19:29:48 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:

Description Philip Spencer 2001-02-20 18:56:05 UTC
With the current kernel and glibc combination (kernel 2.2.17 / glibc
2.2-12), rpc.statd does not work. It logs "gethostbyname error" messages
when looking up its own host name. The resolver appears to be trying to
look in /etc/hosts and fails when this inaccessible due to the chrooting of
rpc.statd. A second problem is that rpc.statd logs messages to systlog in
UTC instead of the local timezone, presumably due to the inaccessibility of
/etc/localtime.

There is a line in the statd.c source file which indicates that this was a
problem before
and a fix was attempted by calling sethostent(1) before chrooting:

  /* Arm the ****** resolver before chroot() so it doesn't fail
   * trying to open /etc/* for the dozenth time
   */
  sethostent(1);

However, this fix no longer works with the current kernel / glibc
combination (at least not on our systems). It also doesn't address the
problem with the incorrect times in the system log.

We have temporarily worked around the problem by creating a directory
/var/lib/nfs/statd/etc and putting copies of /etc/resolv.conf, /etc/hosts,
and /etc/localtime there. This fixes both of the above-mentioned problems.
However this is a suboptimal solution since it means maintaining two
separate copies of each of these files, and who knows what else rpc.statd
might be missing out on.

Comment 1 Bob Matthews 2001-02-26 17:48:04 UTC
Fixed in current version of nfs-utils (0.2.1).