Mirantis | The #1 Pure Play OpenStack Company

Working through DNS and DHCP service configuration issues in OpenStack Nova

In a previous post about integrating Infoblox address management with OpenStack, we described a challenge we faced in storing all DHCP and DNS data on an Infoblox appliance to provide enterprise-level DHCP service for internal VMs and DNS for external clients. While DNS driver implementation was pretty straightforward, this integration exposed an interesting problem: DHCP in Nova was hardcoded to only use dnsmasq.

DNS

Nova’s DNS driver abstraction did not work properly in VlanManager, so we had to fix this. The fix has been merged into Openstack with two separate changes: first is here; second is here.

Our driver adds and removes domains to/from the Infoblox appliance using the ibcli Perl tool. Note that Nova has to be properly configured to use this (see this README). The desired parent domain for all instances should be specified in the instance_dns_domain variable and the domain will be created on Infoblox automatically. Every time a new instance is created, two new DNS records will be added to that domain: one with its hostname and one with its UUID. When an instance is destroyed, these records are removed.

DHCP service in OpenStack Nova

As I said earlier, Nova never had a way to use a DHCP service provider other than dnsmasq. It took some effort to cut and abstract out all dnsmasq calls into a separate driver. We’ve filed a change request that allows someone to write their own driver to any DHCP service out there. The change request is currently under discussion. With this change, every time a network or a virtual interface is created or destroyed, Nova calls the DHCP driver to do the proper adjustments in the DHCP backend. The default dnsmasq driver just regenerates dnsmasq config and restarts it with each request just as it was done earlier. The Infoblox driver creates a network on Infoblox and then provides it with a static configuration for specific MAC-IP pairs for each virtual interface. The DHCP driver works through the same ibcli tool and uses the same configuration variables as the DNS driver.

Code

Both drivers are in the same module published at this GAP Inc. GitHub account and can be easily installed on your system with standard Python tools. Be aware that to use these drivers you have to install not only ibcli and its Perl requirements from CPAN, but also the Infoblox Perl API module from the appliance itself. (The process is described in detail in the Infoblox appliance’s documentation.)

5 comments
Google Plus Mirantis

5 Responses

Continuing the Discussion

  1. Dell Open Source Ecosystem Digest: OpenStack, Hadoop & More 5-2012 - Dell TechCenter - TechCenter - Dell Community

    [...] through DNS and DHCP service configuration issues in OpenStack Nova’” by Yury Taraday http://www.mirantis.com/blog/dns-dhcp-service-configuration-openstack-nova/MorphLabs: “Private Cloud in a Box Webinar Recap Recap and Video” by Yoram [...]

    November 30, 201204:12
  2. Dell Community

    [...] through DNS and DHCP service configuration issues in OpenStack Nova’” by Yury Taraday http://www.mirantis.com/blog/dns-dhcp-service-configuration-openstack-nova/MorphLabs: “Private Cloud in a Box Webinar Recap Recap and Video” by Yoram [...]

    November 30, 201206:22
  3. Dell Open Source Ecosystem Digest: OpenStack, Hadoop & More 5-2012 | ServerGround.net

    [...] through DNS and DHCP service configuration issues in OpenStack Nova’” by Yury Taraday http://www.mirantis.com/blog/dns-dhcp-service-configuration-openstack-nova/MorphLabs: “Private Cloud in a Box Webinar Recap Recap and Video” by Yoram [...]

    November 30, 201207:40
  4. OpenStack Community Weekly Newsletter (Nov 16-30) » The OpenStack Blog

    [...] By Mirantis: Working through DNS and DHCP service configuration issues in OpenStack Nova [...]

    November 30, 201207:49
  5. Technology Short Take #29 - blog.scottlowe.org - The weblog of an IT pro specializing in virtualization, storage, and servers

    [...] of $10 million in funding from various sources—posted a write-up in late November 2012 on troubleshooting some DNS and DHCP service configuration issues in OpenStack Nova. The post is a bit specific to work Mirantis did in integrating an InfoBlox [...]

    February 4, 201306:01

Some HTML is OK


or, reply to this post via trackback.