Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFE: stop using libvirt's dnsmasq #437

Open
fcami opened this issue Aug 3, 2021 · 3 comments
Open

RFE: stop using libvirt's dnsmasq #437

fcami opened this issue Aug 3, 2021 · 3 comments

Comments

@fcami
Copy link
Contributor

fcami commented Aug 3, 2021

libvirt's dnsmasq auto-maintains the reverse DNS zone for the virtual network it owns.
Any DHCP lease will be recorded in the reverse DNS zone.
This breaks FreeIPA's automatic DNS reverse zone detection ( freeipa/freeipa#5939 ).

A solution would be to have a BIND instance installed on the ipatests runner, configured with two upstream DNS servers and configure all test runners to use that instance.

@fcami
Copy link
Contributor Author

fcami commented Aug 3, 2021

Another possibility (rather than configuring a BIND instance) is to configure systemd-resolved to avoid using the parent libvirt dnsmasq. In /etc/systemd/resolved.conf.d/dns_servers.conf:

[Resolve]
DNS=<IP_OF_DNS1> <IP_OF_DNS2>
Domains=~.

@wladich
Copy link

wladich commented Aug 31, 2021

I made a check with a VM inside inside vagrant-libvirt:

# hostname -i
fe80::ca85:118d:a8f5:2d43%eth0 192.168.121.181
[root@fedora vagrant]# dig -x 192.168.121.181 @192.168.121.1

; <<>> DiG 9.16.20-RH <<>> -x 192.168.121.181 @192.168.121.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 42825
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;181.121.168.192.in-addr.arpa.	IN	PTR

;; Query time: 0 msec
;; SERVER: 192.168.121.1#53(192.168.121.1)
;; WHEN: Tue Aug 31 12:26:52 UTC 2021
;; MSG SIZE  rcvd: 57

I am not sure if dnsmasq creates or does not create any DNS records for VMs, but anyway it does not return then in DNS requests

@rjeffman
Copy link
Member

Under Fedora 36 (cloud image) there is an answer for dig -x.

[root@server ~]# cat /etc/os-release | sed -n "/^NAME=/p;/^VARIANT=/p"
NAME="Fedora Linux"
VARIANT="Cloud Edition"
[root@server ~]# hostname -i
fe80::b873:a31a:d26:8507%eth0 192.168.122.63
[root@server ~]# dig -x 192.168.122.63

; <<>> DiG 9.16.28-RH <<>> -x 192.168.122.63
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 34400
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;63.122.168.192.in-addr.arpa.	IN	PTR

;; ANSWER SECTION:
63.122.168.192.in-addr.arpa. 0	IN	PTR	urep.ipa.test.

;; Query time: 1 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: Wed May 25 14:41:55 UTC 2022
;; MSG SIZE  rcvd: 83

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants