crc: Wildcard DNS resolution for apps-crc.testing does not appear to be working

crc version CodeReady Containers version: 1.37.0+3876d27d OpenShift version: 4.9.10 (embedded in executable)

RHEL 8.5 (Ootpa)

cat /etc/resolv.conf 
# Generated by NetworkManager
nameserver 127.0.0.1
options edns0 trust-ad

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 1
  • Comments: 20 (7 by maintainers)

Most upvoted comments

@Sunmx your suggestion looks like a good idea, except for me :

sudo cat /var/lib/libvirt/dnsmasq/crc.conf
[sudo] password for ubuntu: 
##WARNING:  THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE
##OVERWRITTEN AND LOST.  Changes to this configuration should be made using:
##    virsh net-edit crc
## or other application using the libvirt API.
##
## dnsmasq conf file created by libvirt
strict-order
user=libvirt-dnsmasq
pid-file=/run/libvirt/network/crc.pid
except-interface=lo
bind-dynamic
interface=crc
dhcp-range=192.168.130.1,static
dhcp-no-override
dhcp-authoritative
dhcp-hostsfile=/var/lib/libvirt/dnsmasq/crc.hostsfile
addn-hosts=/var/lib/libvirt/dnsmasq/crc.addnhosts

and: /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/crc.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leaseshelper when I use the virsh edit command I get an XML file and it is unclear to me how the address line is added that you mention.

I also actually see many hosts added in my host file for the 192.168.130.11 IP but not for the deployed app.

I run ubuntu 22.04 LTS. would be great to have a way to add the line by libvirt API, thanks [update] tried : https://libvirt.org/formatnetwork.html#elementsAddress using that in the conf file does not work, crc does not want to proceed beyond starting the machine. I’ll work around things by adding host entries for now, seems like a bug if many other routes are there. Not sure where to file an improvement/bug, so I’ll leave it for now [/update]