Public bug reported:

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.

** Affects: neutron
     Importance: Undecided
     Assignee: ZongKai LI (lzklibj)
         Status: In Progress

** Changed in: neutron
     Assignee: (unassigned) => ZongKai LI (lzklibj)

-- 
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:
  In Progress

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     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to