summaryrefslogtreecommitdiffstats
path: root/nova
diff options
context:
space:
mode:
authorMandar Vaze <mandar.vaze@vertex.co.in>2012-04-11 01:43:22 -0700
committerMandar Vaze <mandar.vaze@vertex.co.in>2012-04-12 04:15:32 -0700
commit30c8293ea7d4c9464e0139fb488e202fd0947f52 (patch)
tree11e7b963c2869c188494dbbe88043e5946c95c2b /nova
parent42f3bec10c7f7374ad4e9752b275b02ca2b2fdb9 (diff)
downloadnova-30c8293ea7d4c9464e0139fb488e202fd0947f52.tar.gz
nova-30c8293ea7d4c9464e0139fb488e202fd0947f52.tar.xz
nova-30c8293ea7d4c9464e0139fb488e202fd0947f52.zip
QuantumManager will start dnsmasq during startup. Fixes bug 977759
Added _setup_network_on_host method, which calls update_dhcp if quantum_use_dhcp is set. Change-Id: I193212037873001a03da7b7a484f61a5c13b5de8
Diffstat (limited to 'nova')
-rw-r--r--nova/network/quantum/manager.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/nova/network/quantum/manager.py b/nova/network/quantum/manager.py
index 33370948b..1dbcaafe5 100644
--- a/nova/network/quantum/manager.py
+++ b/nova/network/quantum/manager.py
@@ -88,6 +88,7 @@ class QuantumManager(manager.FloatingIP, manager.FlatManager):
def init_host(self):
# Initialize general L3 networking
self.l3driver.initialize()
+ super(QuantumManager, self).init_host()
# Initialize floating ip support (only works for nova ipam currently)
if FLAGS.quantum_ipam_lib == 'nova.network.quantum.nova_ipam_lib':
LOG.debug("Initializing FloatingIP support")
@@ -107,6 +108,22 @@ class QuantumManager(manager.FloatingIP, manager.FlatManager):
for c in cidrs:
self.l3driver.initialize_network(c)
+ # Similar to FlatDHCPMananger, except we check for quantum_use_dhcp flag
+ # before we try to update_dhcp
+ def _setup_network_on_host(self, context, network):
+ """Sets up network on this host."""
+ network['dhcp_server'] = self._get_dhcp_ip(context, network)
+ self.l3driver.initialize_gateway(network)
+
+ if FLAGS.quantum_use_dhcp and not FLAGS.fake_network:
+ dev = self.driver.get_dev(network)
+ self.driver.update_dhcp(context, dev, network)
+ if FLAGS.use_ipv6:
+ self.driver.update_ra(context, dev, network)
+ gateway = utils.get_my_linklocal(dev)
+ self.db.network_update(context, network['id'],
+ {'gateway_v6': gateway})
+
def _update_network_host(self, context, net_uuid):
"""Set the host column in the networks table: note that this won't
work with multi-host but QuantumManager doesn't support that