summaryrefslogtreecommitdiffstats
path: root/nova
diff options
context:
space:
mode:
authorChristian Berendt <berendt@b1-systems.de>2011-02-07 19:14:03 +0000
committerTarmac <>2011-02-07 19:14:03 +0000
commit5a2e8b2b6571636b2cf9ddc36a4c509fedde9b93 (patch)
tree070c64df2390a9b0952afe46ba98729fe33c6867 /nova
parent40715cfde9f20ede97b696c3c3ebbbf67aaa8243 (diff)
parente62665a12e0b02ef73562a5d579782972332cbe1 (diff)
downloadnova-5a2e8b2b6571636b2cf9ddc36a4c509fedde9b93.tar.gz
nova-5a2e8b2b6571636b2cf9ddc36a4c509fedde9b93.tar.xz
nova-5a2e8b2b6571636b2cf9ddc36a4c509fedde9b93.zip
added new parameter --dhcp_domain to set the used domain by dnsmasq in /etc/nova/nova.conf
Diffstat (limited to 'nova')
-rw-r--r--nova/network/linux_net.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/nova/network/linux_net.py b/nova/network/linux_net.py
index cdd1f666a..de0e488ae 100644
--- a/nova/network/linux_net.py
+++ b/nova/network/linux_net.py
@@ -37,6 +37,9 @@ FLAGS = flags.FLAGS
flags.DEFINE_string('dhcpbridge_flagfile',
'/etc/nova/nova-dhcpbridge.conf',
'location of flagfile for dhcpbridge')
+flags.DEFINE_string('dhcp_domain',
+ 'novalocal',
+ 'domain to use for building the hostnames')
flags.DEFINE_string('networks_path', '$state_path/networks',
'Location to keep network config files')
@@ -313,8 +316,9 @@ interface %s
def _host_dhcp(fixed_ip_ref):
"""Return a host string for an address"""
instance_ref = fixed_ip_ref['instance']
- return "%s,%s.novalocal,%s" % (instance_ref['mac_address'],
+ return "%s,%s.%s,%s" % (instance_ref['mac_address'],
instance_ref['hostname'],
+ FLAGS.dhcp_domain,
fixed_ip_ref['address'])
@@ -359,6 +363,7 @@ def _dnsmasq_cmd(net):
' --strict-order',
' --bind-interfaces',
' --conf-file=',
+ ' --domain=%s' % FLAGS.dhcp_domain,
' --pid-file=%s' % _dhcp_file(net['bridge'], 'pid'),
' --listen-address=%s' % net['gateway'],
' --except-interface=lo',