Bug 517570 - ypbind fails to read configuration file at startup
Summary: ypbind fails to read configuration file at startup
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: ypbind
Version: 11
Hardware: i386
OS: Linux
low
medium
Target Milestone: ---
Assignee: Karel Klíč
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-08-14 18:18 UTC by Bill Kanawyer
Modified: 2013-03-03 22:59 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-04-15 15:02:54 UTC
Type: ---


Attachments (Terms of Use)

Description Bill Kanawyer 2009-08-14 18:18:27 UTC
Description of problem:
With the current ISO of Fedora 11, NIS fails to read in /etc/yp.conf at startup except when the "-c" (check config file for errors) flag is given.



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


How reproducible:
NetworkManager and wpa_suppliment packages were yum erased.
Network connection to a local sub-net was established.
Local sub-net has at lease one NIS server that will respond to a broadcast.
/etc/sysconfig/network has appropriate NISDOMAIN variable set and/or domainname set.

Steps to Reproduce:
1. Run "/sbin/ypbind -c" to confirm /etc/yp.conf is accessed.
2. Run "/sbin/ypbind " to confirm /etc/yp.conf IS NO accessed.
3. Run "/sbin/ypbind --broadcast" to confirm broadcast functionality works.
  
Actual results:
When invoked in configuration check mode, /etc/yp.conf is accessed:

[root@localhost.localdomain ~]# strace -f -e open /sbin/ypbind -c -debug
open("/etc/ld.so.cache", O_RDONLY)      = 3
open("/usr/lib/libdbus-glib-1.so.2", O_RDONLY) = 3
open("/lib/libdbus-1.so.3", O_RDONLY)   = 3
open("/lib/libgobject-2.0.so.0", O_RDONLY) = 3
open("/lib/libglib-2.0.so.0", O_RDONLY) = 3
open("/lib/libpthread.so.0", O_RDONLY)  = 3
open("/lib/libnsl.so.1", O_RDONLY)      = 3
open("/lib/libc.so.6", O_RDONLY)        = 3
open("/lib/libcap.so.2", O_RDONLY)      = 3
open("/lib/libattr.so.1", O_RDONLY)     = 3
open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = 3
open("/etc/yp.conf", O_RDONLY)          = 3
3437: parsing config file
open("/usr/share/locale/locale.alias", O_RDONLY) = 4
open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/ypbind-mt.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US.utf8/LC_MESSAGES/ypbind-mt.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US/LC_MESSAGES/ypbind-mt.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.UTF-8/LC_MESSAGES/ypbind-mt.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.utf8/LC_MESSAGES/ypbind-mt.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/ypbind-mt.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
3437: Trying entry: domain MyDomain broadcast
Trying entry: domain MyDomain broadcast
3437: parsed domain 'MyDomain' broadcast
3437: add_server() domain: MyDomain, broadcast
Config file /etc/yp.conf is ok.




But when invoked in running mode, it is not:

[root@localhost.localdomain ~]# strace -f -e open /sbin/ypbind -debug
open("/etc/ld.so.cache", O_RDONLY)      = 3
open("/usr/lib/libdbus-glib-1.so.2", O_RDONLY) = 3
open("/lib/libdbus-1.so.3", O_RDONLY)   = 3
open("/lib/libgobject-2.0.so.0", O_RDONLY) = 3
open("/lib/libglib-2.0.so.0", O_RDONLY) = 3
open("/lib/libpthread.so.0", O_RDONLY)  = 3
open("/lib/libnsl.so.1", O_RDONLY)      = 3
open("/lib/libc.so.6", O_RDONLY)        = 3
open("/lib/libcap.so.2", O_RDONLY)      = 3
open("/lib/libattr.so.1", O_RDONLY)     = 3
open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = 3
open("/var/yp/binding", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
3439: [Welcome to ypbind-mt, version 1.20.4]

3439: ping interval is 20 seconds

Process 3440 attached (waiting for parent)
Process 3440 resumed (parent 3439 ready)
[pid  3440] open("/var/run/ypbind.pid", O_RDWR|O_CREAT, 0644) = 3
Process 3441 attached
3441: NetworkManager is not running.

Process 3441 detached
Process 3442 attached

Expected results:


Additional info:

Comment 1 Karel Klíč 2010-04-15 14:24:14 UTC
Hi Bill,

if you set NISDOMAIN/domainname only in the /etc/sysconfig/network, the ypbind must be started using `service ypbind start`, as /sbin/ypbind program itself does not look into /etc/sysconfig/network, but /etc/init.d/ypbind does.

If the domainname is set on the command line, and then /sbin/ypbind is run, it reads /etc/yp.conf.

Comment 2 Bill Kanawyer 2010-04-15 14:48:04 UTC
Karel,

Thanks for looking into this issue.

My memory may be playing tricks on me, but I don't ever recall in 20+ years of working with ypbind implementations that it would fail to read /etc/yp.conf by default even if domainname was not previously set. 

Assume for the sake of argument that the domainname was previously set (as I believe it was) before running the tests. Therefore please try....

Steps to Reproduce:
0. Run "domainname my.test.domain" to set domain name
1. Run "/sbin/ypbind -c" to confirm /etc/yp.conf is accessed.
2. Run "/sbin/ypbind " to confirm /etc/yp.conf IS NOT accessed.
3. Run "/sbin/ypbind --broadcast" to confirm broadcast functionality works.

Are you still unable to reproduce the error in step 2 as reported?

If you cannot reproduce the failure under those circumstances, please go ahead and close the case as a no change.

Thank you again for your interest.

Comment 3 Karel Klíč 2010-04-15 15:02:54 UTC
Yes, I am unable to reproduce the error. I already tried the steps as described with the domainname set, and ypbind accessed /etc/yp.conf every time. When the domainname is not set, ypbind without -c does not open /etc/yp.conf, and it prints "domainname not set - aborting."

Fedora 12 behaves the same as F-11.

Closing now. Please reopen this bug if it still fails on your computer even with the domainname set.


Note You need to log in before you can comment on or make changes to this bug.