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...
Alias: None
Product: Fedora
Classification: Fedora
Component: libvirt   
(Show other bugs)
Version: rawhide
Hardware: All Linux
Target Milestone: ---
Assignee: Daniel Veillard
QA Contact:
Depends On:
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:
Story Points: ---
Clone Of:
Last Closed: 2007-05-04 16:28:35 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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 Berrange 2007-04-30 19:45:15 UTC
Hmm, so 'man resolv.conf' says

       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.)

While 'man dnsmasq' says

       -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

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

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.