network_get_all_by_host does not return the right networks
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Undecided
|
Jason Kölker |
Bug Description
network_
Proposed:
$ git diff
diff --git a/nova/
index 2136dbd..3544023 100644
--- a/nova/
+++ b/nova/
@@ -2067,11 +2067,15 @@ def network_
@require_
def network_
+ session = get_session()
+ fixed_ip_query = model_query(
+ session=session).\
+ filter(
# NOTE(vish): return networks that have host set
# or that have a fixed ip with host set
host_filter = or_(models.
- models.FixedIp.host == host)
- return _network_
+ models.
+ return _network_
Which emits the following query:
SELECT
networks.
networks.
networks.
networks.
networks.id AS networks_id,
networks.label AS networks_label,
networks.
networks.cidr AS networks_cidr,
networks.
networks.
networks.
networks.
networks.
networks.bridge AS networks_bridge,
networks.
networks.
networks.
networks.dns1 AS networks_dns1,
networks.dns2 AS networks_dns2,
networks.vlan AS networks_vlan,
networks.
networks.
networks.
networks.
networks.
networks.
networks.
networks.host AS networks_host,
networks.uuid AS networks_uuid
FROM networks
WHERE networks.deleted = :deleted_1
AND (
networks.host = :host_1 OR
networks.id IN (SELECT fixed_ips.
Changed in nova: | |
assignee: | nobody → Jason Kölker (jason-koelker) |
status: | New → Confirmed |
Changed in nova: | |
milestone: | none → essex-rc1 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | essex-rc1 → 2012.1 |
Fix proposed to branch: master /review. openstack. org/5282
Review: https:/