Bug 238210 - network support uses nameservers in random order, not the order in host's resolv.conf
Summary: network support uses nameservers in random order, not the order in host's res...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: libvirt
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Daniel Veillard
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-04-27 23:43 UTC by David Lutterkort
Modified: 2013-04-30 23:40 UTC (History)
3 users (show)

Fixed In Version: 0.2.2-3.fc7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-05-04 16:28:35 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description David Lutterkort 2007-04-27 23:43:11 UTC
Using the network 'default', DNS works differently in the guests than in the
host: I have a local DNS server, which is mentioned as the first ns in
/etc/resolv.conf on the host, but from the guest, it seems dnsmasq just talks to
a random ns from that file, and therefore doesn't reliably resolve my local
names. Should probably turn 'strict-order' on in the dnsmasq.conf

Comment 1 Daniel Berrangé 2007-04-30 19:45:15 UTC
Hmm, so 'man resolv.conf' says

[quote]
       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.)
[/quote]


While 'man dnsmasq' says

[quote]
       -o, --strict-order
              By  default,  dnsmasq will send queries to any of the upstream
servers it knows about and tries to favour servers to are known to
              be up. Setting this flag forces dnsmasq to try each query with
each server strictly in the order they appear in /etc/resolv.conf
[/quote]

So, by default dnsmasq is definitely doing wrong behaviour - it should match
GLibC's algorithm. Thus we defintely need to add  --strict-order to the flags we
use.


Comment 2 Mark McLoughlin 2007-05-04 16:28:35 UTC
Fixed in 0.2.2-3.fc7


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