Neutron server producing tracebacks with 'L3RouterPlugin' object has no attribute 'is_distributed_router' when DVR is enabled

Bug #1785848 reported by Miguel Lavalle
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Brian Haley

Bug Description

In environments where DVR is enabled and when an instance with floating IPs is moved from one host to another (due to live migration or shelving / un-shelvinng) the Neutron server produces the following traceback:

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/neutron_lib/callbacks/manager.py", line 197, in _notify_loop
    callback(resource, event, trigger, **kwargs)
  File "/opt/stack/new/neutron/neutron/db/l3_dvrscheduler_db.py", line 460, in _notify_l3_agent_port_update
     l3plugin.is_distributed_router(fip['router_id']) and
AttributeError: 'L3RouterPlugin' object has no attribute 'is_distributed_router'

The problem was introduced by this patch: https://review.openstack.org/#/c/579058. Line https://review.openstack.org/#/c/579058/3/neutron/db/l3_dvrscheduler_db.py@460 wrongly tries to call is_distributed_router as though it is a method in the L3 plugin. The real intent was to call it from module neutron/db/l3_dvr_db.py, since it is defined there outside any classes

Miguel Lavalle (minsel)
Changed in neutron:
assignee: nobody → Miguel Lavalle (minsel)
importance: Undecided → Medium
Miguel Lavalle (minsel)
Changed in neutron:
assignee: Miguel Lavalle (minsel) → Brian Haley (brian-haley)
Revision history for this message
Miguel Lavalle (minsel) wrote :
Changed in neutron:
status: New → Confirmed
tags: added: l3-dvr-backlog
Changed in neutron:
importance: Medium → High
milestone: none → rocky-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/589573

Changed in neutron:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/589573
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=bc2a4a4032ee22d7edd62f8a9f21ff14cfa3eccf
Submitter: Zuul
Branch: master

commit bc2a4a4032ee22d7edd62f8a9f21ff14cfa3eccf
Author: Brian Haley <email address hidden>
Date: Tue Aug 7 15:06:43 2018 -0400

    Correctly call is_distributed_router()

    A recent change to _notify_l3_agent_port_update() was
    making a call to is_distributed_router() via the l3plugin,
    but since that method lives in l3_dvr_db.py it was
    failing. This was not caught by the unit test since it
    was mocking the return value.

    Had to modify things to get the router first since the
    object is required for the check.

    Change-Id: I2289f882b692b375d1b40d7a50d206d72da66155
    Closes-bug: #1785848

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 13.0.0.0rc1

This issue was fixed in the openstack/neutron 13.0.0.0rc1 release candidate.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.