yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #91628
[Bug 2012643] Re: [sqlalchemy-20] sqlalchemy.exc.InvalidRequestError: No 'on clause' argument may be passed when joining to a relationship path as a target
Reviewed: https://review.opendev.org/c/openstack/neutron/+/878479
Committed: https://opendev.org/openstack/neutron/commit/0a69dd5e3dcfba124348b168aafc82a0f8dadd41
Submitter: "Zuul (22348)"
Branch: master
commit 0a69dd5e3dcfba124348b168aafc82a0f8dadd41
Author: Rodolfo Alonso Hernandez <ralonsoh@xxxxxxxxxx>
Date: Wed Mar 22 12:51:22 2023 +0100
[sqlalchemy-20] query.join should define one table/column per call
The method ``get_router_for_floatingip`` query needs to define a join
clausule per table or column to be joined.
The expected query is the following one:
SELECT DISTINCT routerports.router_id AS routerports_router_id,
ipallocations.ip_address AS ipallocations_ip_address
FROM routerports
JOIN ports ON ports.id = routerports.port_id
JOIN ipallocations ON ports.id = ipallocations.port_id
JOIN ports AS gw_port ON gw_port.device_id = routerports.router_id
WHERE ports.network_id = ?
AND routerports.port_type IN (XXX)
AND ipallocations.subnet_id = ?
AND gw_port.network_id = ?
AND gw_port.device_owner = ?
The goal is to retrieve the router that matches the GW IP, that is in
the same subnet and network as provided.
Closes-Bug: #2012643
Change-Id: Id054ffaca17153ff470b6bc91f7c3da4f7bf0fdc
** Changed in: neutron
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/2012643
Title:
[sqlalchemy-20] sqlalchemy.exc.InvalidRequestError: No 'on clause'
argument may be passed when joining to a relationship path as a target
Status in neutron:
Fix Released
Bug description:
Log:
https://58a87e825b9766115d07-cec36eea8e90c9127fc5a72b798cfeab.ssl.cf2.rackcdn.com/878359/1/experimental/neutron-
functional-with-sqlalchemy-master/b586fb3/testr_results.html
Snippet: https://paste.opendev.org/show/bK0cFbPeJdJlKAqaH1o9/
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/2012643/+subscriptions
References