← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1735557] Re: Failed HA router initialization can lead to exception

 

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

commit c62d54d0c21fc4a760d2ac6501f9493137c5eb8a
Author: Brian Haley <bhaley@xxxxxxxxxx>
Date:   Thu Nov 30 16:47:43 2017 -0500

    Fix HA router initialization exception
    
    When an HA router initialization fails early, it can lead to:
    
     AttributeError: 'HaRouter' object has no attribute 'process_monitor'
    
    Add init of 'self.process_monitor' in RouterInfo init code in
    case we try and cleanup early.
    
    Change-Id: Iddeaeef13adee10f7b130e3f9e584b6e9f037030
    Closes-bug: #1735557


** 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/1735557

Title:
  Failed HA router initialization can lead to exception

Status in neutron:
  Fix Released

Bug description:
  When an HA router initialization fails, it can lead to the following
  exception:

  ERROR neutron.agent.l3.ha_router [-] Unable to process HA router 59fad7c2-d393-464f-820b-334927047e64 without HA port
  TRACE neutron.agent.l3.ha_router None
  TRACE neutron.agent.l3.ha_router
  ERROR neutron.agent.l3.agent [-] Error while initializing router 59fad7c2-d393-464f-820b-334927047e64
  TRACE neutron.agent.l3.agent Traceback (most recent call last):
  TRACE neutron.agent.l3.agent   File "/usr/lib/python2.7/site-packages/neutron/agent/l3/agent.py", line 335, in _router_added
  TRACE neutron.agent.l3.agent     ri.initialize(self.process_monitor)
  TRACE neutron.agent.l3.agent   File "/usr/lib/python2.7/site-packages/neutron/agent/l3/ha_router.py", line 83, in initialize
  TRACE neutron.agent.l3.agent     raise Exception(msg)
  TRACE neutron.agent.l3.agent Exception: Unable to process HA router 59fad7c2-d393-464f-820b-334927047e64 without HA port
  TRACE neutron.agent.l3.agent
  ERROR neutron.agent.l3.agent [-] Error while deleting router 59fad7c2-d393-464f-820b-334927047e64
  TRACE neutron.agent.l3.agent Traceback (most recent call last):
  TRACE neutron.agent.l3.agent   File "/usr/lib/python2.7/site-packages/neutron/agent/l3/agent.py", line 342, in _router_added
  TRACE neutron.agent.l3.agent     ri.delete(self)
  TRACE neutron.agent.l3.agent   File "/usr/lib/python2.7/site-packages/neutron/agent/l3/ha_router.py", line 359, in delete
  TRACE neutron.agent.l3.agent     self.destroy_state_change_monitor(self.process_monitor)
  TRACE neutron.agent.l3.agent AttributeError: 'HaRouter' object has no attribute 'process_monitor'

  The problem is that self.process_monitor is added in
  RouterInfo.initialize(), but that isn't called after we verify an
  ha_port exists in HaRouter.initialize().

  Adding 'self.process_monitor = None' in RouterInfo.__init__ should fix
  the problem.

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1735557/+subscriptions


References