DNS failure in KVM guests

For example, trying to update apt results in:

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic/InRelease Could not resolve '78-110-168-0--24.maas-internal'

resolv.conf contents:

nameserver 127.0.0.53
options edns0
search maas

I’m seeing this too (maas 2.8.0-8557-g.1f4b79007).

From inside a deployed kvm:

ubuntu@civil-beetle:~$ sudo apt update                                                                                                                                                                                                                                                                                                                                                                                         [50/54510]
Err:1 http://archive.ubuntu.com/ubuntu bionic InRelease
  Could not resolve '10-0-5-0--24.maas-internal'
Err:2 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
  Could not resolve '10-0-5-0--24.maas-internal'         
Err:3 http://archive.ubuntu.com/ubuntu bionic-security InRelease
  Could not resolve '10-0-5-0--24.maas-internal'
Err:4 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
  Could not resolve '10-0-5-0--24.maas-internal'
Reading package lists... Done
Building dependency tree       
Reading state information... Done                                                                                                                                                                                                                                                                                                                                                                                                        
All packages are up to date.
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic/InRelease  Could not resolve '10-0-5-0--24.maas-internal'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease  Could not resolve '10-0-5-0--24.maas-internal'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-security/InRelease  Could not resolve '10-0-5-0--24.maas-internal'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-backports/InRelease  Could not resolve '10-0-5-0--24.maas-internal'
W: Some index files failed to download. They have been ignored, or old ones used instead.

ubuntu@civil-beetle:~$ dig @127.0.0.53 10-0-5-0--24.maas-internal A                                                                                                                                                  
; <<>> DiG 9.11.3-1ubuntu1.12-Ubuntu <<>> @127.0.0.53 10-0-5-0--24.maas-internal A
; (1 server found)                       
;; global options: +cmd                  
;; Got answer:                           
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 49111
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
                                                                                                          
;; OPT PSEUDOSECTION:                    
; EDNS: version: 0, flags:; udp: 65494   
;; QUESTION SECTION:                     
;10-0-5-0--24.maas-internal.    IN      A
                                                                                                          
;; Query time: 2 msec             
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: Thu Jul 02 19:57:56 UTC 2020
;; MSG SIZE  rcvd: 55         
                                              
ubuntu@civil-beetle:~$ dig @10.0.5.10 10-0-5-0--24.maas-internal A                                                                                                                                                   
; <<>> DiG 9.11.3-1ubuntu1.12-Ubuntu <<>> @10.0.5.10 10-0-5-0--24.maas-internal A
; (1 server found)
;; global options: +cmd
;; Got answer:           
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 49910
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 2
                                                                                                          
;; OPT PSEUDOSECTION:   
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: 95f19501ec6ceaa5cce7c0d55efe3c54dcf35277b84471be (good)
;; QUESTION SECTION:      
;10-0-5-0--24.maas-internal.    IN      A
                                                                                                          
;; ANSWER SECTION:
10-0-5-0--24.maas-internal. 15  IN      A       10.0.5.10

;; AUTHORITY SECTION:
maas-internal.          15      IN      NS      maas.

;; ADDITIONAL SECTION:
maas.                   30      IN      A       10.0.5.10

;; Query time: 0 msec
;; SERVER: 10.0.5.10#53(10.0.5.10)
;; WHEN: Thu Jul 02 19:58:12 UTC 2020
;; MSG SIZE  rcvd: 133

ubuntu@civil-beetle:~$ systemd-resolve --status                                                                                                                                                                      
Global
          DNSSEC NTA: 10.in-addr.arpa
                      16.172.in-addr.arpa
                      168.192.in-addr.arpa
                      17.172.in-addr.arpa
                      18.172.in-addr.arpa
                      19.172.in-addr.arpa
                      20.172.in-addr.arpa
                      21.172.in-addr.arpa
                      22.172.in-addr.arpa
                      23.172.in-addr.arpa
                      24.172.in-addr.arpa
                      25.172.in-addr.arpa
                      26.172.in-addr.arpa
                      27.172.in-addr.arpa
                      28.172.in-addr.arpa
                      29.172.in-addr.arpa
                      30.172.in-addr.arpa
                      31.172.in-addr.arpa
                      corp
                      d.f.ip6.arpa
                      home
                      internal
                      intranet
                      lan
                      local
                      private
                      test

Link 2 (eth0)
      Current Scopes: DNS
       LLMNR setting: yes
MulticastDNS setting: no
      DNSSEC setting: no
    DNSSEC supported: no
         DNS Servers: 10.0.5.10
                      fe80::7683:c2ff:fed6:3b4a
          DNS Domain: maas
                      maas.local

10-0-5-0--24.maas-internal resolves if I dig the MAAS DNS server directly, but it doesn’t resolve when using the kvm-local resolver, even though the upstream MAAS server (10.0.5.10) is in the list of DNS servers listed by systemd-resolve --status.

I went to the Subnets tab, clicked on my subnet (10.0.5.0/24), and discovered that the DNS field was empty. I set that to the IP of my maas machine (10.0.5.10), and that fixed my problem.

So simple fix, but it was surprising to me that it wasn’t set by default.

1 Like

still, @tvansteenburgh, nice catch. i’ll try to figure out if there’s a good reason it’s not set by default; no promises, but i’ll check.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.