Bug 238210

Summary: network support uses nameservers in random order, not the order in host's resolv.conf
Product: [Fedora] Fedora Reporter: David Lutterkort <lutter>
Component: libvirtAssignee: Daniel Veillard <veillard>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: hbrock, markmc, xen-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 0.2.2-3.fc7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-05-04 12:28:35 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

Description David Lutterkort 2007-04-27 19:43:11 EDT
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 Berrange 2007-04-30 15:45:15 EDT
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 12:28:35 EDT
Fixed in 0.2.2-3.fc7