# How are dnsmasq DNS entries generated and FQDN then sent to instances ?

Hi all,

We are facing an issue in our folsom (currently with nova-network) deployment :

As we are using Puppet to manage the configuration of our instances, we need to set up the FQDNs accordingly to pull the right configurations (eg. server1.prod.example.com and server1.dev.example.com will get different configurations based on the environment type prod or dev).

We wanted to proceed in the following way :

In /etc/nova/nova.conf

#Will be common to all of the instances
dhcp_domain=example.com


And then name our instances server1.prod, server1.dev, etc. to get the correct FQDN. As it turns out, instances don't get FQDN as expected :

$hostname server1$ hostname -f
server1.example.com


So we have a part of the hostname that is stripped. Is this a normal behavior, a misconfiguration ? Is it openstack that strips the hostname before sending it to dnsmasq or rather dnsmasq that creates a dns entry with only what's before the first dot ? Or something else ??

edit retag close merge delete

Sort by » oldest newest most voted

dnsmasq explicitly prevents what you're trying from working, see http://www.thekelleys.org.uk/dnsmasq/docs/setup.html :

By default the names must no have a domain part, ie they must just be a alphanumeric name, without any dots.

You can leave empty the dhcp_domain option and create an additional network with nova-manage, assigning to each a different 'label'.

Such a label is used as a 'tag' for the dnsmasq's dhcp-range argument. You can then use a custom dnsmasq config file (see dnsmasq_config_file option) to set different DHCP options (like the domain suffix) for the different tags.

more