summaryrefslogtreecommitdiffstats
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
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
-rw-r--r--Authors1
-rw-r--r--nova/network/linux_net.py7
2 files changed, 7 insertions, 1 deletions
diff --git a/Authors b/Authors
index 994a5be9b..27782738f 100644
--- a/Authors
+++ b/Authors
@@ -6,6 +6,7 @@ Armando Migliaccio <Armando.Migliaccio@eu.citrix.com>
Chiradeep Vittal <chiradeep@cloud.com>
Chmouel Boudjnah <chmouel@chmouel.com>
Chris Behrens <cbehrens@codestud.com>
+Christian Berendt <berendt@b1-systems.de>
Cory Wright <corywright@gmail.com>
David Pravec <David.Pravec@danix.org>
Dan Prince <dan.prince@rackspace.com>
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',