Bug 1031093

Summary: Document that yp.conf is rewritten after booting the system
Product: [Fedora] Fedora Reporter: Benoît Gaurier <gaurierben>
Component: ypbindAssignee: Honza Horak <hhorak>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: gaurierben, hhorak
Target Milestone: ---Keywords: Documentation
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: ypbind-1.37.1-8.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-14 02:52:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Benoît Gaurier 2013-11-15 15:28:52 UTC
Description of problem:
After each boot, the /etc/yp.conf file is overwritten and the server name is lost/disappears. So, ypbind.service does not start. 

Version-Release number of selected component (if applicable):
F20-beta
Kernel: 3.11.8-300.fc20.x86_64
ypbind-1.37.1-7.fc20.x86_64

How reproducible:
After each boot

Steps to Reproduce:
1. Use system-config-authentication to set the NIS domain and server or write them in the file /etc/yp.conf
2. Reboot
3. ypbind.service do not start because the NIS server name disappears in the /etc/yp.conf file

Actual results:
the NIS server name disappears in the yp.conf file after reboot

Expected results:
the NIS server name stays in the yp.conf file in order to start correctly the ypbind.service

Additional info:

Comment 1 Honza Horak 2013-11-18 07:44:08 UTC
This is most probably caused by /etc/dhcp/dhclient.d/nis.sh, which is a script executed by dhclient and is expected to update /etc/yp.conf according to information from DHCP. In case you don't wish to update /etc/yp.conf by DHCP, you should define PEERNIS="no" in /etc/sysconfig/network. Does this change help in your case?

Comment 2 Benoît Gaurier 2013-11-18 09:19:18 UTC
Thank you. It boots very well and quickly when I add the variable PEERNIS="no" to the file /etc/sysconfig/network.

However, I never add it before and it was always working with the previous releases. After a check on another PC with F18, this is what I have on /etc/sysconfig/network:
NETDOMAIN=yes
NISDOMAIN=mynisdomain
NTPSERVERARGS=iburst

and my yp.conf looks like:
domain mynisdomain broadcast

With F20, what I have now is the following:
/etc/sysconfig/network is:
NISDOMAIN=mynisdomain
PEERNIS="no"

and yp.conf:
domain mynisdomain server mynisserver

Comment 3 Honza Horak 2013-11-18 12:03:18 UTC
(In reply to Benoît Gaurier from comment #2)
> However, I never add it before and it was always working with the previous
> releases.

What I can say about ypbind is that its behaviour in this respect hasn't changed for a long time. So it seems to me like either something on network changed (e.g. DHCP configuration now sends NIS information, while it didn't before) or DHCP has some different behaviour.

Anyway, this functionality is not documented yet, so I'm going to add the following into ypbind(8) man page:
"
DHCP client by defualt changes /etc/yp.conf in case DHCP server sends NIS configuration in the respond. In that case /etc/dhcp/dhclient.d/nis.sh changes /etc/yp.conf according such configuration and creates a back-up copy of the original configuration file into /var/lib/dhclient/nis.conf.predhclient.$interface.  In order to disable changing /etc/yp.conf by DHCP client, add PEERNIS=no into /etc/sysconfig/network.
"

Comment 4 Fedora Update System 2013-11-18 12:21:25 UTC
ypbind-1.37.1-8.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/ypbind-1.37.1-8.fc20

Comment 5 Fedora Update System 2013-11-18 20:19:44 UTC
Package ypbind-1.37.1-8.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing ypbind-1.37.1-8.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-21629/ypbind-1.37.1-8.fc20
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2013-12-14 02:52:59 UTC
ypbind-1.37.1-8.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.