Bug 238210 - network support uses nameservers in random order, not the order in host's resolv.conf
network support uses nameservers in random order, not the order in host's res...
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: libvirt (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Veillard
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-04-27 19:43 EDT by David Lutterkort
Modified: 2013-04-30 19:40 EDT (History)
3 users (show)

See Also:
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:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
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

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