Working through DNS and DHCP service configuration issues in OpenStack Nova
November 26, 2012
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.
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
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.
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
Continuing the Discussion