Reviewed: https://review.openstack.org/274550 Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=951dd5e015cbd102aed80a6808f623b4626e727d Submitter: Jenkins Branch: master
commit 951dd5e015cbd102aed80a6808f623b4626e727d Author: lzklibj <[email protected]> Date: Mon Feb 1 16:39:54 2016 +0800 Fix port relationship for DVRPortBinding uselist=False is used for one to one relationship, but for DVRPortBinding, a router_interface_distributed port can have multiple bindings. That causes SAWarning: Multiple rows returned with uselist=False for lazily-loaded attribute 'Port.dvr_port_binding'. "uselist=False" is misused in DVRPortBinding port relationship, this patch will fix this. Change-Id: I2b00d96aaa445e0977bc3d4957d35a28d44dd953 Closes-Bug: #1540259 ** 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/1540259 Title: uselist should be True to DVRPortBinding orm.relationship Status in neutron: Fix Released Bug description: In DVR scenario, after a router interface has been bound to multiple hosts, when we remove this interface from router, in neutron server log, SQL warning will raise: SAWarning: Multiple rows returned with uselist=False for eagerly-loaded attribute 'Port.dvr_port_binding' it's caused by https://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/models.py#L130, uselist is set to False. But indeed, table ml2_dvr_port_bindings stores all bindings for router_interface_distributed ports, and for a that kind of port, it could have multiple bindings. So it's not a one- to-one relationship, we should remove "uselist=False" in DVRPortBinding port orm.relationship. To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1540259/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

