I've added transactions in places where agent_id is set in port_bindings: https://github.com/openstack/neutron/blob/master/neutron/scheduler/l3_agent_scheduler.py#L295-L297 and https://github.com/openstack/neutron/blob/master/neutron/scheduler/l3_agent_scheduler.py#L330-L331. I've also added a unique constraint for l3_agent_id and router_id pair.
This helped and l3habindings with duplications or with l3_agent_id=None don't appear anymore.
I've added transactions in places where agent_id is set in port_bindings: https:/ /github. com/openstack/ neutron/ blob/master/ neutron/ scheduler/ l3_agent_ scheduler. py#L295- L297 and https:/ /github. com/openstack/ neutron/ blob/master/ neutron/ scheduler/ l3_agent_ scheduler. py#L330- L331. I've also added a unique constraint for l3_agent_id and router_id pair.
This helped and l3habindings with duplications or with l3_agent_id=None don't appear anymore.