Bug 473705 - Yast-DNS-Server changes NETCONFIG_DNS_FORWARDER to bind, so /etc/resolv.conf has no nameserver entries
Summary: Yast-DNS-Server changes NETCONFIG_DNS_FORWARDER to bind, so /etc/resolv.conf ...
Status: RESOLVED DUPLICATE of bug 473308
Alias: None
Product: openSUSE 11.1
Classification: openSUSE
Component: YaST2 (show other bugs)
Version: Final
Hardware: x86-64 openSUSE 11.1
: P5 - None : Normal with 5 votes (vote)
Target Milestone: ---
Assignee: Marius Tomaschewski
QA Contact: Jiri Srain
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-08 08:48 UTC by Joe Morris
Modified: 2009-02-25 10:44 UTC (History)
4 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joe Morris 2009-02-08 08:48:07 UTC
User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.6) Gecko/2009012700 SUSE/3.0.6-1.4 Firefox/3.0.6

When using the Yast2 module for setting up DNS, it automatically sets the NETCONFIG_DNS_FORWARDER variable to bind so that netconfig updates /etc/named.d/forwarders.conf, which works fine.  But, since I do not use NetworkManager (static net setup), /etc/resolv.conf only gets the search list written.  Since by using this Yast2 DNS module, it could maybe be assumed the DNS server is being setup, adding nameserver 127.0.0.1 should also be added (by netconfig?), otherwise there is no name server entries in resolv.conf.  Updating the forwarders works correctly via the Yast2 module, updating NETCONFIG_DNS_STATIC_SERVERS, which should allow the local DNS server work if only nameserver 127.0.0.1 were added to resolv.conf.

Reproducible: Always

Steps to Reproduce:
1.Change for example DNS forwarders via Yast2 DNS Server module.
2.Check /etc/sysconfig/network/config NETCONFIG_DNS_FORWARDER is set to bind
3.With Network Manager set to no, netconfig only writes the search list to /etc/resolv.conf.
Actual Results:  
Most networking broke, i.e. Yast, browser, mail client, ping, traceroute, Kopete, etc.  Only dig and skype would work.  Manually adding nameserver 127.0.0.1 allowed it to work.

Expected Results:  
Networking would work better using the Yast tools, not get broken.

I am not really sure this this is the best way.  I would maybe prefer that what is shown in Network Devices, Network Settings, Hostname/DNS have resolv.conf info like it used to be, and the DNS forwarders be set like it used to be only in the DNS module.  Is there a netconfig policy that would allow it to modify resolv.conf and the DNS module handle the forwarder.conf as it used to do?
Comment 1 Joe Morris 2009-02-08 08:55:23 UTC
I just also thought of one important thing, the info in resolv.conf if running a local DNS server should have nameserver 127.0.0.1, but not the forwarders.conf.  So the NETCONFIG_DNS_STATIC_SERVER variable can be either the DNS forwarders OR the nameservers for resolv.conf.  In previous versions, it was possible to append the local nameserver to what was added to resolv.conf.  I do not see a way to do this anymore.  So if the variable NETCONFIG_DNS_FORWADER is set to bind, then nameserver 127.0.0.1 should always be appended to nameserver entries in resolv.conf in my thinking.
Comment 2 Edward Howson 2009-02-11 08:54:22 UTC
I'm assuming this is the same as my experience.  I ran some updates and found it broke in the middle of the process and couldn't find the hosts.  All networking activities seem to cease except for nslookup.  Eventually, I discovered that the resolv.conf was void of nameservers despite the fact that I had name servers listed in the network devices section of yast.  For me this was a show-stopper, however I was able to get things going by manually editing the resolv.conf file and listing my nameservers.
Comment 3 Marius Tomaschewski 2009-02-24 18:33:58 UTC
It looks like something in the system changed between the time of
the implementation & tests in netconfig and the 11.1 release time.

It should be not needed to set any nameserver in /etc/resolv.conf:

From man resolv.conf(5):

       nameserver Name server IP address
              Internet  address  (in  dot  notation) of a name server that the
              resolver  should  query.   Up  to  MAXNS   (currently   3,   see
              <resolv.h>)  name  servers  may  be listed, one per keyword.  If
              there are multiple servers, the resolver library queries them in
              the  order  listed.   If  no nameserver entries are present, the
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
              default is to use the name server on the  local  machine.   (The
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
              algorithm  used  is to try a name server, and if the query times
              out, try the next, until out of name servers, then repeat trying
              all  the  name  servers  until  a  maximum number of retries are
              made.)

In fact, not setting any, has had the advantage, that the resolver
was trying to reach the nameserver on local machine via IPv4 and
IPv6, so it was not needed to check if IPv6 is enabled or not or
limit it to use IPv4 only.
Because of this fact, we also don't set any in netconfig.

On my 11.0 and SLES-10 systems not settings any still works fine...
Comment 6 Petr Baudis 2009-02-25 00:35:10 UTC
This is a bug in the latest glibc maintenance update for 11.1; there is another one going through the QA triage for some time now, with this fixed. SLE11 might be affected in some RC but should have this fixed right now.
Comment 7 Marius Tomaschewski 2009-02-25 10:44:19 UTC
Resolving as duplicate.

*** This bug has been marked as a duplicate of bug 473308 ***