Bug 183338 - adding a domain to search: lost by dhcp when network restarts
adding a domain to search: lost by dhcp when network restarts
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: system-config-network (Show other bugs)
11
All Linux
medium Severity medium
: ---
: ---
Assigned To: Harald Hoyer
bzcl34nup
:
Depends On:
Blocks: 87718
  Show dependency treegraph
 
Reported: 2006-02-28 07:13 EST by Jón Fairbairn
Modified: 2010-06-28 06:21 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-06-28 06:21:38 EDT
Type: ---
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 Jón Fairbairn 2006-02-28 07:13:45 EST
Description of problem:
system-config-network allows the search domains to be altered on a dynamic
config, but does it the wrong way so it's forgotten.

Version-Release number of selected component (if applicable):
system-config-network-1.3.26-1

How reproducible:
always

Steps to Reproduce:
1.system-config-network
2.select DNS tab
3.add a domain to the end of the search box
4.save and restart network

Actual results:
no change; new search domain is lost when dhcp rewrites /etc/resolv.conf

Expected results:
search domain should be listed in new /etc/resolf.conf

Additional info:
if the config is dhcp,
system-config-network ought to do this by setting SEARCH="dom dom dom..."
in (ultimately) /etc/sysconfig/network, not by writing a resolv.conf
Comment 1 Jón Fairbairn 2007-12-22 10:29:40 EST
Still present in Fedora 8,
system-config-network-1.4.3-1.fc8
Comment 2 Bug Zapper 2008-04-03 13:02:32 EDT
Based on the date this bug was created, it appears to have been reported
against rawhide during the development of a Fedora release that is no
longer maintained. In order to refocus our efforts as a project we are
flagging all of the open bugs for releases which are no longer
maintained. If this bug remains in NEEDINFO thirty (30) days from now,
we will automatically close it.

If you can reproduce this bug in a maintained Fedora version (7, 8, or
rawhide), please change this bug to the respective version and change
the status to ASSIGNED. (If you're unable to change the bug's version
or status, add a comment to the bug and someone will change it for you.)

Thanks for your help, and we apologize again that we haven't handled
these issues to this point.

The process we're following is outlined here:
http://fedoraproject.org/wiki/BugZappers/F9CleanUp

We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.
Comment 3 Jón Fairbairn 2008-04-03 13:39:56 EDT
Still present in up to date fc8 with
system-config-network-1.4.7-1.fc8

Incidentally, I don't think I reported this during any rawhide.
Comment 4 Bug Zapper 2008-05-13 22:06:13 EDT
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 5 Gilles Dubreuil 2008-05-22 03:04:05 EDT
This issue is not related to the system-config-network tool.

The latter only set up the SEARCH="domain1 domain2 ... domainX" variable in the
/etc/sysconfig/network file.

As a matter of fact creating such a line in /etc/sysconfig/network will be
visible from the GUI.

That was working in FC8 and is not in FC9.
Comment 6 Jón Fairbairn 2008-07-03 03:53:10 EDT
In Fedora 9 system-config-network changes
/etc/sysconfig/network-scripts/ifcfg-eth?
(/etc/sysconfig/networking/devices/ifcfg-eth?), not /etc/sysconfig/network.  It
also changes /etc/resolv.conf.  The change to ifcfg-eth? persists across network
restarts, but the change to /etc/resolv.conf does not.

However, if the interface is managed by NetworkManager, the /etc/resolv.conf
gets the right search line
Comment 7 Jón Fairbairn 2008-07-05 10:09:45 EDT
Further to the above (system-config-network now sets the right things), the real
bug appears to be in dhclient, however, it appears that there's still a bug in
system-config-network; if I add a domain to the search and then restart the
network, although ifcfg-eth? still has the right value, a subsequent run of
system-config-network doesn't offer the added domain in the "DNS search path" box.

Presumably it's still reading from /etc/resolv.conf rather than from ifcfg-eth??
Comment 8 Bug Zapper 2009-06-09 18:07:11 EDT
This message is a reminder that Fedora 9 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 9.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '9'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 9's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 9 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 9 Jón Fairbairn 2009-06-28 12:07:22 EDT
Still present in fedora 11. ie, if I use system-config-network to add a domain to the search list, on restarting the network something (dhclient?) removes it from /etc/resolv.conf (doesn't carry it over (from /etc/sysconfig/networking/profiles/default/resolv.conf?))

Component changed to dhcp in the hope that that's the right one.
Comment 10 David Cantrell 2009-06-30 16:43:20 EDT
dhclient-script will honor a SEARCH variable in your ifcfg-DEVICE file and use that for the search line in resolv.conf.  Additionally, dhclient-script saves your previous resolv.conf and restores it when dhclient is shut down for the interface.  Some questions I have:

1) Are you using NetworkManager or the network service?

2) If using the network service, can you make sure your resolv.conf has the settings you want and you have the necessary SEARCH line in your ifcfg-DEVICE file, then 'ifup' the device.  Attach a copy of the new /etc/resolv.conf as well as the saved resolv.conf file from /var/lib/dhclient.
Comment 11 Jón Fairbairn 2009-07-01 07:10:54 EDT
Re 1: It's headless, so the network service

Re 2:

I've investigated this extensively this morning (and I don't
think it's worthwhile attaching any of the versions of the
files). Contrary to Comment #5, system-config-network does
NOT set SEARCH in any /etc/sysconfig/network* file, nor does
it read SEARCH from any of them. It currently
(system-config-network-1.5.97-1.fc11.noarch) simply changes
/etc/resolv.conf (this seems to be a regression).

If SEARCH is not set in
/etc/sysconfig/network-scripts/ifcfg-eth0 but there is a
search line in /etc/resolv.conf, dhclient ignores this
latter and creates a search line from what it gets from the
dhcp server. This seems like reasonable behaviour. Whether
it's correct I'll leave up to you...

If SEARCH is set in
/etc/sysconfig/network-scripts/ifcfg-eth0
dhclient uses this when creating the new /etc/resolv.conf
This also seems reasonable (etc).

It seems clear to me that system-config-network should read
and write SEARCH in /etc/sysconfig.*/ifcfg-$device. So I
reckon the bug really is in system-config-network.

Assuming that you'll agree with that contention (David),
I've changed the component back to system-config-network


This bug hat been hanging around since before Fedora 8, and
it bites me every time I upgrade to another version of
Fedora, so I'd be grateful if it were resolved.
Comment 12 Penelope Fudd 2009-07-29 14:07:57 EDT
I'm also tinkering with SEARCH in /etc/sysconfig/network-scripts/ifcfg-eth0.

More precisely, I need to add two domains to the search list, and override the dhcp-provided dns server, like so:

SEARCH="domain1.com domain2.com"
DNS1=1.1.1.1
DNS2=2.2.2.2

To test it, I do this:
# ifdown eth0
# rm /etc/resolv.conf*
# killall dhclient
# ifup eth0

As a result, I get this:
# cat /etc/resolv.conf
; generated by /sbin/dhclient-script
nameserver 1.1.1.1
nameserver 2.2.2.2
search domain1.com

# cat /etc/resolv.conf.save
; generated by /sbin/dhclient-script
search domain1.com domain2.com
nameserver 192.168.217.2

As you can see, typing 'ifup' creates resolv.conf and resolv.conf.save.  The resolv.conf has the correct (overridden) dns servers and only one search domain, while the resolv.conf.save has the wrong (dhcp) dns server and the correct search path.  

What's crazy is that the correct information is all coming from the same file (/etc/sysconfig/network-scripts/ifcfg-eth0).  I even tried extra quotes: SEARCH="'domain1.com domain2.com'", the quotes show up in resolv.conf.save but not in resolv.conf, which is unaffected.

I wonder if this bug is why someone decided to start over with NetworkManager.
Comment 13 Bug Zapper 2010-04-27 07:38:51 EDT
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '11'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 11's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 11 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 14 Bug Zapper 2010-06-28 06:21:38 EDT
Fedora 11 changed to end-of-life (EOL) status on 2010-06-25. Fedora 11 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

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