Package: neutron / 2:13.0.2-15

Join_on_explcit_relationship_paths.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
From: Mike Bayer <mike_mp@zzzcomputing.com>
Subject: Join on explcit relationship paths
 The join() in get_router_for_floatingip() is joining from entity
 to entity without an explicit ON clause which creates an ambiguous
 situation.  SQLAlchemy 1.3 guards against this now, so use the
 real relationship-bound path so that the ORM does not need to guess.
Date: Fri, 8 Mar 2019 14:09:14 -0500
Closes-bug: #1819260
Change-Id: Ia377a9d1a32a78abdaee74c79e395acd77e486ef
Origin: upstream, https://review.openstack.org/#/c/642117/
Last-Update: 2019-03-13

Index: neutron/neutron/db/l3_db.py
===================================================================
--- neutron.orig/neutron/db/l3_db.py
+++ neutron/neutron/db/l3_db.py
@@ -1137,7 +1137,7 @@ class L3_NAT_dbonly_mixin(l3.RouterPlugi
         # TODO(lujinluo): Need IPAllocation and Port object
         routerport_qry = context.session.query(
             RouterPort.router_id, models_v2.IPAllocation.ip_address).join(
-            models_v2.Port, models_v2.IPAllocation).filter(
+            RouterPort.port, models_v2.Port.fixed_ips).filter(
             models_v2.Port.network_id == internal_port['network_id'],
             RouterPort.port_type.in_(constants.ROUTER_INTERFACE_OWNERS),
             models_v2.IPAllocation.subnet_id == internal_subnet['id']