← Back to team overview

yahoo-eng-team team mailing list archive

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

 

Public bug reported:

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.

** Affects: neutron
     Importance: Undecided
     Assignee: Brian Haley (brian-haley)
         Status: In Progress


** Tags: l3-ha

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

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


Follow ups