Description of problem:
Seems to be ignoring server line in config files.
I use dnsmasq to locally resolve the names of virtual machines in my kvm environment. I have the following setup:
virsh net-dumpxml default
<port start='1024' end='65535'/>
<bridge name='virbr0' stp='on' delay='0'/>
<domain name='home.mcd' localOnly='yes'/>
<ip address='192.168.122.1' netmask='255.255.255.0'>
<range start='192.168.122.2' end='192.168.122.50'/>
<host mac='52:54:00:b3:1c:96' name='tower' ip='192.168.122.100'/>
<host mac='52:54:00:5a:38:4a' name='ocp' ip='192.168.122.200'/>
<host mac='52:54:00:5a:38:4b' name='ocp-int' ip='192.168.122.201'/>
<host mac='52:54:00:5a:38:4c' name='ocp-infra' ip='192.168.122.202'/>
<host mac='52:54:00:5a:38:4d' name='ocp-app' ip='192.168.122.203'/>
virsh dominfo sb-31
OS Type: hvm
State: shut off
Max memory: 4194304 KiB
Used memory: 4194304 KiB
Managed save: no
Security model: selinux
Security DOI: 0
With dnsmasq-2.80-10.fc31.x86_64 I can run nslookup on sb-31 and it resolves. This also allows me to ssh sb-31, without having to know its ip address. It comes in handy when you have 20 vms running doing diffrent things.
With the new version: dnsmasq-2.80-12.fc31.x86_64
That is no longer the case.
nslookup fails for anything under "home.mcd"
It does resolve anything for *.apps.home.mcd which it gets from the line: address=/.apps.home.mcd/192.168.122.200 in the file: /etc/NetworkManager/dnsmasq.d/libvirt_dnsmasq.conf (this was for openshift testing)
As far as I can tell everything is loaded fine and no errors in journalctl for NetworkManager or libvirtd. Looking at the journalctl -u NetworkManager -b 0 it even looks like it setup dns correctly:
Mar 17 14:28:51 wormhole.home.mcd dnsmasq: setting upstream servers from DBus
Mar 17 14:28:51 wormhole.home.mcd dnsmasq: using nameserver 192.168.122.1#53 for domain home.mcd
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Install dnsmasq-2.80-10.fc31.x86_64
2. Setup dnsmasq to resolve local domain with kvm (https://liquidat.wordpress.com/2017/03/03/howto-automated-dns-resolution-for-kvmlibvirt-guests-with-a-local-domain/)
3. Update to dnsmasq-2.80-12.fc31.x86_64
kvm virtual machines no longer resolve with nslookup/dig
kvm virtual machines should still resolve with nslookup/dig
Looks like a nasty regression somewhere here -- not just with VMs. Just upgraded to dnsmasq-2.80-12.fc31.x86_64 and no machine on the LAN was able to resolve addresses stored in hosts files for the LAN's internal domain. Upstream forwarding to the outside world still works. Rolled back to -10 and everything works as before.
Is there a reason why address= starts with a dot? It seems it would work better without dot.
But anyway, both dnsmasq-2.80-10.fc30.x86_64, dnsmasq-2.80-12.fc30.x86_64 and dnsmasq-2.81-1.rc3.fc30.x86_64 seems to work on my machine well. Would it be possible just f31 build is broken?
I don't have any indication that it is a fedora problem, but i guess its possible. I would gladly run some tests if there is anything I can do.
The . in my address line "address=/.apps.home.mcd/192.168.122.200" was used to act like a wildcard pointing to my openshift router. Without that none of my pods could be reached from the host system.
exp: tomcat-app.apps.home.mcd would automatically to to 192.168.122.200(openshift router) which would forward the request to the correct pod. If i remember correctly it did not work with just apps.home.mcd.
I have been using this same dnsmasq config since fed 29(possibly longer) this is the first time I have had this issue. Please let me know if there is anything else I can provide.
I made mistake with latest build in F31. Please check bug #1814468, which is indeed broken. Just that build, next one is corrected.
Could you try build ? Propably just duplicate of that fix.
I am convinced now it is the same issue, so closing this bug as duplicate. Referenced bug has better described what is exact issue, even this was also well documented.
I think it was mistake when testing, that I reported dnsmasq-2.80-12.fc30.x86_64 version ok. Proper test proved just 2.80-12 had wrong patch, causing all DNS queries to receive just empty reply.
*** This bug has been marked as a duplicate of bug 1814468 ***