https://bugs.launchpad.net/dragonflow/+bug/1738195
The DNS service enables users to look up their instances and external services using the Domain Name System (DNS)
Currently Neutron reference implementation for internal DNS resolving [1] [2] spawns a Dnsmasq server for every namespace on the compute node, per tenant per subnet, that is configured with DHCP server.
Those are the same Dnsmasq services used by the reference implementation for the DHCP server. Since Dragonflow uses its own DHCP [3], currently Dnsmasq is being deployed only for internal DNS resolving.
Dragonflow can resolve DNS queries on with one service per compute node, and prevent spawning multiple Dnsmasq services per compute node.
The DNS service contains two main elements:
The DNS application will receive the DNS lookup request from the VM. If the DNS lookup address should be resolved to a local address, it will return the local address. Otherwise, it will forward the lookup to the External DNS server.
Different VMs on different tenants can have identical IPs. Resolving DNS query for local address will be done only for IPs relevant to the VM’s subnet and tenant.
Dragonflow will deploy a new service (similar to the Metadata service). It will resolve DNS lookups for local address, or forward the request to an external server. The DNS service address will be added to the default DNS servers offered by the DHCP application. Currently the DNS service address will be the same as the router.
+-----------------------------------+
| | +-------------+
| +-----+ +-------------+ | +----+ External DNS|
| | | | | | | + Service |
| | VM | |DF Controller| | | +-------------+
| +-----+ | | | |
| | | | | |
| | +-------------+ | |
| | | DNS | | |
| | | Service | | |
| | | | | |
| | | +-----------+
| |VM port +-------------+ |
| |IP 169.254.1.25 | DNS server: 169.254.1.2
| +---------------------------+ |
| | OVS switch | |
| +---------------------------+ |
| |
+-----------------------------------+
Pros:
Cons:
Dragonflow will “hijack” any outgoing DNS lookups to external DNS services. If the address can be resolved locally, a response packet will be constructed and returned. Otherwise, the packet will continue to its original destination.
+-----------------------------------+
| | +-------------+
| +-----+ +-------------+ | +----+ External DNS|
| | | | | | | + Service |
| | VM | |DF Controller| | | +-------------+
| +-----+ | +--------+ | |
| | | |DNS App | | |
| | | | | | |
| | | | | | |
| | | | +-----------+
| |VM port +-------------+ |
| |IP 169.254.1.25 | DNS server: 8.8.8.8
| +---------------------------+ |
| | OVS switch | |
| +---------------------------+ |
| |
+-----------------------------------+
Pros
Cons
Additional table will be created: DNSaaS. It will contain two lists:
DomainName
+--------------+
| |
| subnet |
| |
| domain_name |
| |
+--------------+
DnsName
+---------------+
| |
| lport |
| |
| dns_name |
| |
+---------------+
The missing information will be provided by Neutron.
[1] | https://docs.openstack.org/neutron/pike/admin/config-dns-int.html |
[2] | https://specs.openstack.org/openstack/neutron-specs/specs/liberty/internal-dns-resolution.html |
[3] | https://github.com/openstack/dragonflow/blob/master/doc/source/distributed_dhcp.rst |
[4] | https://github.com/cmouse/pdns-remotebackend-python |
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.