Without the patch for LP: #1668771 resolved caches the SERVFAIL answer.
root@bionic:/home/multipass# host www.montemar.cl
Host www.montemar.cl not found: 2(SERVFAIL)
root@bionic:/home/multipass# journalctl -u systemd-resolved -f
-- Logs begin at Fri 2019-07-26 13:10:01 -04. --
Jul 26 13:13:12 bionic systemd-resolved[3167]: Transaction 25942 for <www.montemar.cl IN A> scope dns on ens3/*.
Jul 26 13:13:12 bionic systemd-resolved[3167]: Using feature level UDP for transaction 25942.
Jul 26 13:13:12 bionic systemd-resolved[3167]: Sending query packet with id 25942.
Jul 26 13:13:12 bionic systemd-resolved[3167]: Processing incoming packet on transaction 25942. (rcode=SERVFAIL)
Jul 26 13:13:12 bionic systemd-resolved[3167]: Server returned error: SERVFAIL
Jul 26 13:13:12 bionic systemd-resolved[3167]: Verified we get a response at feature level UDP from DNS server 10.91.4.1.
Jul 26 13:13:12 bionic systemd-resolved[3167]: Added SERVFAIL cache entry for www.montemar.cl IN A 30s
Jul 26 13:13:12 bionic systemd-resolved[3167]: Transaction 25942 for <www.montemar.cl IN A> on scope dns on ens3/* now complete with <rcode-failure> from network (unsigned).
Jul 26 13:13:12 bionic systemd-resolved[3167]: Sending response packet with id 26821 on interface 1/AF_INET.
Jul 26 13:13:12 bionic systemd-resolved[3167]: Freeing transaction 25942.
With the patch for LP: #1668771 resolved + setting Cache: 'no-negative' doesn't caches the SERVFAIL option
root@bionic:/home/multipass# host www.montemar.cl
Host www.montemar.cl not found: 2(SERVFAIL)
root@bionic:/home/multipass# journalctl -u systemd-resolved -f
-- Logs begin at Fri 2019-07-26 13:10:01 -04. --
Jul 26 13:13:40 bionic systemd-resolved[3199]: Transaction 48671 for <www.montemar.cl IN A> scope dns on ens3/*.
Jul 26 13:13:40 bionic systemd-resolved[3199]: Using feature level UDP for transaction 48671.
Jul 26 13:13:40 bionic systemd-resolved[3199]: Sending query packet with id 48671.
Jul 26 13:13:40 bionic systemd-resolved[3199]: Processing incoming packet on transaction 48671. (rcode=SERVFAIL)
Jul 26 13:13:40 bionic systemd-resolved[3199]: Server returned error: SERVFAIL
Jul 26 13:13:40 bionic systemd-resolved[3199]: Verified we get a response at feature level UDP from DNS server 10.91.4.1.
Jul 26 13:13:40 bionic systemd-resolved[3199]: Not caching negative entry for: www.montemar.cl IN A, cache mode set to no-negative
Jul 26 13:13:40 bionic systemd-resolved[3199]: Transaction 48671 for <www.montemar.cl IN A> on scope dns on ens3/* now complete with <rcode-failure> from network (unsigned).
Jul 26 13:13:40 bionic systemd-resolved[3199]: Sending response packet with id 25454 on interface 1/AF_INET.
Jul 26 13:13:40 bionic systemd-resolved[3199]: Freeing transaction 48671.
Without the patch for LP: #1668771 resolved caches the SERVFAIL answer.
root@bionic: /home/multipass # host www.montemar.cl /home/multipass # journalctl -u systemd-resolved -f resolved[ 3167]: Transaction 25942 for <www.montemar.cl IN A> scope dns on ens3/*. resolved[ 3167]: Using feature level UDP for transaction 25942. resolved[ 3167]: Sending query packet with id 25942. resolved[ 3167]: Processing incoming packet on transaction 25942. (rcode=SERVFAIL) resolved[ 3167]: Server returned error: SERVFAIL resolved[ 3167]: Verified we get a response at feature level UDP from DNS server 10.91.4.1. resolved[ 3167]: Added SERVFAIL cache entry for www.montemar.cl IN A 30s resolved[ 3167]: Transaction 25942 for <www.montemar.cl IN A> on scope dns on ens3/* now complete with <rcode-failure> from network (unsigned). resolved[ 3167]: Sending response packet with id 26821 on interface 1/AF_INET. resolved[ 3167]: Freeing transaction 25942.
Host www.montemar.cl not found: 2(SERVFAIL)
root@bionic:
-- Logs begin at Fri 2019-07-26 13:10:01 -04. --
Jul 26 13:13:12 bionic systemd-
Jul 26 13:13:12 bionic systemd-
Jul 26 13:13:12 bionic systemd-
Jul 26 13:13:12 bionic systemd-
Jul 26 13:13:12 bionic systemd-
Jul 26 13:13:12 bionic systemd-
Jul 26 13:13:12 bionic systemd-
Jul 26 13:13:12 bionic systemd-
Jul 26 13:13:12 bionic systemd-
Jul 26 13:13:12 bionic systemd-
With the patch for LP: #1668771 resolved + setting Cache: 'no-negative' doesn't caches the SERVFAIL option
root@bionic: /home/multipass # host www.montemar.cl /home/multipass # journalctl -u systemd-resolved -f resolved[ 3199]: Transaction 48671 for <www.montemar.cl IN A> scope dns on ens3/*. resolved[ 3199]: Using feature level UDP for transaction 48671. resolved[ 3199]: Sending query packet with id 48671. resolved[ 3199]: Processing incoming packet on transaction 48671. (rcode=SERVFAIL) resolved[ 3199]: Server returned error: SERVFAIL resolved[ 3199]: Verified we get a response at feature level UDP from DNS server 10.91.4.1. resolved[ 3199]: Not caching negative entry for: www.montemar.cl IN A, cache mode set to no-negative resolved[ 3199]: Transaction 48671 for <www.montemar.cl IN A> on scope dns on ens3/* now complete with <rcode-failure> from network (unsigned). resolved[ 3199]: Sending response packet with id 25454 on interface 1/AF_INET. resolved[ 3199]: Freeing transaction 48671.
Host www.montemar.cl not found: 2(SERVFAIL)
root@bionic:
-- Logs begin at Fri 2019-07-26 13:10:01 -04. --
Jul 26 13:13:40 bionic systemd-
Jul 26 13:13:40 bionic systemd-
Jul 26 13:13:40 bionic systemd-
Jul 26 13:13:40 bionic systemd-
Jul 26 13:13:40 bionic systemd-
Jul 26 13:13:40 bionic systemd-
Jul 26 13:13:40 bionic systemd-
Jul 26 13:13:40 bionic systemd-
Jul 26 13:13:40 bionic systemd-
Jul 26 13:13:40 bionic systemd-
Marking this as verified and working.