Working through DNS and DHCP service configuration issues in OpenStack Nova

Yury Taraday - 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.

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.)

banner-img
From Virtualization to Containerization
Learn how to move from monolithic to microservices in this free eBook
Download Now
How is Cloud Native Changing the Landscape of Edge and 5G? [Recording]

Late last year, Mirantis hosted a Cloud Native and Coffee panel featuring CTO Adam Parco, Global Field CTO Shaun O’Meara, Director of Technical Marketing Nick Chase, and special guest Darragh Grealish, CTO of 56K Cloud. Below are highlights of the discussion that touch on what edge is and how developers can bring cloud native innovation to edge computing and 5G. Watch …

How is Cloud Native Changing the Landscape of Edge and 5G? [Recording]
Moving to Cloud Native: How to Move Apps from Monolithic to Microservices

Enterprises face the challenge of consistently deploying and managing applications in production, at scale. Fortunately, there are more technologies and tools available today than ever before. However, transitioning from a traditional, monolithic architecture to a cloud native one comes with its own unique challenges. Below, you will find a list of the critical first steps you need to take when …

Moving to Cloud Native: How to Move Apps from Monolithic to Microservices
Mirantis Newsletter - January 2022

Every month, Mirantis sends out a newsletter chronicling top industry and company news. Below you’ll find links to blogs, tutorials, videos, and the latest updates to our enterprise, open source, and training offerings. If you don’t currently receive the newsletter, you can subscribe by clicking the button on the top right. Mirantis Brings Secure Registries to Any Kubernetes Distro Launched earlier this …

Mirantis Newsletter - January 2022
Technical training
Learn Kubernetes & OpenStack from Deployment Experts
Prep for certification!
View schedule
LIVE WEBINAR
Getting started with Kubernetes part 2: Creating K8s objects with YAML

Thursday, December 30, 2021 at 10:00 AM PST
SAVE SEAT
LIVE WEBINAR
Manage your cloud-native container environment with Mirantis Container Cloud

Wednesday, January 5 at 10:00 am PST
SAVE SEAT