Quantum + Melange: DHCP generation for networks owned by default tenant is broken
Bug #949234 reported by
Tomasz Paszkowski
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Won't Fix
|
Medium
|
Unassigned | ||
neutron |
Won't Fix
|
Low
|
Unassigned |
Bug Description
All networks which belongs to default tenant have broken dhcp configuration generation. IP addresses allocated from such networks are not returned by get_dhcp_hosts_text function from quantum/manager.py file. To fix this we need to change line #665 from:
ips = self.ipam.
to:
ips = self.ipam.
So the functions will return all allocated ips in this network as we have single dhcp server for all tenants in particular network.
Eventual we can modify call to get_dhcp_hosts_text in functions enable_
description: | updated |
summary: |
- uantum DHCP generation for networks owned by default tenant is broken + Quantum DHCP generation for networks owned by default tenant is broken |
description: | updated |
Changed in quantum: | |
status: | New → Confirmed |
importance: | Undecided → Critical |
milestone: | none → essex-rc1 |
summary: |
- Quantum DHCP generation for networks owned by default tenant is broken + Quantum + Melange: DHCP generation for networks owned by default tenant + is broken |
Changed in nova: | |
status: | New → Confirmed |
Changed in nova: | |
importance: | Undecided → Medium |
tags: | added: quantum-manager |
Changed in quantum: | |
status: | Confirmed → Won't Fix |
To post a comment you must log in.
Thanks for reporting this Tomasz!
Looking at the code, this does look like a bug.
I do not believe the change suggested above is correct though, as it would only work if all networks were assigned to the default tenant. Rather, the project_id passed to get_allocated_ips should be the project_id of the network, not the project_id of the VM. This means it will correctly be None for networks belonging to the default tenant, but set for networks belonging to a particular tenant. Hence, I think we should grab the project_id from the networks object within the for-loop in enable dhcp, and pass that in, instead of the existing code that always passing in the VM's project id:
diff --git a/nova/ network/ quantum/ manager. py b/nova/ network/ quantum/ manager. py network/ quantum/ manager. py network/ quantum/ manager. py manager. FloatingIP, manager. FlatManager) :
quantum_ net_id, interface_id)
index 16e782f..96418ae 100644
--- a/nova/
+++ b/nova/
@@ -452,7 +452,7 @@ class QuantumManager(
hosts = self.get_ dhcp_hosts_ text(context, 'network_ id'], project_id) 'network_ id'], network_ ref['project_ id'])
self. driver. update_ dhcp_hostfile_ with_text( interface_ id, hosts)
self. driver. restart_ dhcp(context, interface_id, network_ref)
- subnet[
+ subnet[
Tomasz, are you able to test out this patch and confirm?