Bug 1277253 - resolv.conf overwritten by dhclient-script despite PEERDNS="no" in ifcfg file with network.service
resolv.conf overwritten by dhclient-script despite PEERDNS="no" in ifcfg file...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: dhcp (Show other bugs)
23
x86_64 Linux
unspecified Severity high
: ---
: ---
Assigned To: Jiri Popelka
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-02 14:54 EST by Adam Williamson
Modified: 2015-11-05 17:24 EST (History)
3 users (show)

See Also:
Fixed In Version: dhcp-4.3.3-6.fc23
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-05 17:24:18 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Adam Williamson 2015-11-02 14:54:09 EST
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 14:54:58 EST
CCing Lukáš for the initscripts stuff.
Comment 2 Jiri Popelka 2015-11-03 08:59:24 EST
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 09:04:07 EST
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 14:52:02 EST
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 17:24:15 EST
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.