Bug 1277253 - resolv.conf overwritten by dhclient-script despite PEERDNS="no" in ifcfg file with network.service
Summary: resolv.conf overwritten by dhclient-script despite PEERDNS="no" in ifcfg file...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dhcp
Version: 23
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Jiri Popelka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-02 19:54 UTC by Adam Williamson
Modified: 2015-11-05 22:24 UTC (History)
3 users (show)

Fixed In Version: dhcp-4.3.3-6.fc23
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-05 22:24:18 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Adam Williamson 2015-11-02 19:54:09 UTC
I upgraded my F21 boxes to F23 this weekend. While doing so I noticed an odd problem on one, which was still running network.service. It has this in its ifcfg-eth0 file:

DEVICE="eth0"
HWADDR="XX:XX:XX:XX:XX:XX"
BOOTPROTO="dhcp"
ONBOOT="yes"
PEERDNS="no"
IPV6INIT=no
IPV6_AUTOCONF=no
DHCPV6=no

but on boot and whenever restarting network.service , resolv.conf would be overwritten by dhclient-script (it was definitely dhclient-script doing it - the file had the 'generated by /usr/sbin/dhclient-script' text added). PEERDNS="no" is explicitly supposed to prevent that. I switched from network.service to NetworkManager.service and this stopped happening, with NM it works fine.

I'm filing against dhcp at Lukáš Nykrýn's suggestion - https://bugzilla.redhat.com/show_bug.cgi?id=1093777#c11 - but it's also possible that the issue may really be in the network scripts somewhere.

Comment 1 Adam Williamson 2015-11-02 19:54:58 UTC
CCing Lukáš for the initscripts stuff.

Comment 2 Jiri Popelka 2015-11-03 13:59:24 UTC
Thanks. Few months ago I've removed [1] dhclient's dependency on initscripts by copying necessary functions from /etc/sysconfig/network-scripts/network-functions and /etc/rc.d/init.d/functions into dhclient-script. I was not sure about source_config(), but now I see we need it because of the PEERDNS.
Should be fixed with [2].

[1] http://pkgs.fedoraproject.org/cgit/dhcp.git/commit/?id=27892ea741e2a7fa82bbba07077fd3606e517c7d
[2] http://pkgs.fedoraproject.org/cgit/dhcp.git/commit/?id=3a458259f53957ab6b7c575af0a37d2e935853c2

Comment 3 Fedora Update System 2015-11-03 14:04:07 UTC
dhcp-4.3.3-6.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-beefdd098b

Comment 4 Fedora Update System 2015-11-03 19:52:02 UTC
dhcp-4.3.3-6.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update dhcp'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-beefdd098b

Comment 5 Fedora Update System 2015-11-05 22:24:15 UTC
dhcp-4.3.3-6.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.


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