Bug 1283263 - HA router can't associate an external network without gateway ip
HA router can't associate an external network without gateway ip
Status: CLOSED UPSTREAM
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-neutron (Show other bugs)
7.0 (Kilo)
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: lpeer
Ofer Blaut
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-18 09:36 EST by Leonid Natapov
Modified: 2016-04-26 10:34 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-18 10:36:46 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Leonid Natapov 2015-11-18 09:36:03 EST
Description of problem:
An association of an HA router with an external network without gateway ip,causes to l3 agent through an exception

How to reproduce:
1) create external net,
2) then create subnet for the net. When creating the subnet, specify --no-gateway
3) set router gateway by neutron-gateway-set <HA router> <external net in 1)>

Then, you will get the error in l3-agent's log.

-------------------
Nov 18 06:35:20 localhost nova-api: 2015-11-18 06:35:20.295 57659 ERROR oslo.messaging._drivers.impl_rabbit [-] AMQP server on 10.35.169.14:5672 is unreachable: timed out. Trying again in 1 seconds.
Nov 18 06:35:21 localhost neutron-l3-agent: 2015-11-18 06:35:21.491 57337 ERROR neutron.agent.l3.router_info [-] local variable 'instance' referenced before assignment
Nov 18 06:35:21 localhost neutron-l3-agent: 2015-11-18 06:35:21.491 57337 ERROR neutron.agent.l3.router_info Traceback (most recent call last):
Nov 18 06:35:21 localhost neutron-l3-agent: 2015-11-18 06:35:21.491 57337 ERROR neutron.agent.l3.router_info   File "/usr/lib/python2.7/site-packages/neutron/common/utils.py", line 356, in call
Nov 18 06:35:21 localhost neutron-l3-agent: 2015-11-18 06:35:21.491 57337 ERROR neutron.agent.l3.router_info     return func(*args, **kwargs)
Nov 18 06:35:21 localhost neutron-l3-agent: 2015-11-18 06:35:21.491 57337 ERROR neutron.agent.l3.router_info   File "/usr/lib/python2.7/site-packages/neutron/agent/l3/router_info.py", line 694, in process
Nov 18 06:35:21 localhost neutron-l3-agent: 2015-11-18 06:35:21.491 57337 ERROR neutron.agent.l3.router_info     self.process_external(agent)
Nov 18 06:35:21 localhost neutron-l3-agent: 2015-11-18 06:35:21.491 57337 ERROR neutron.agent.l3.router_info   File "/usr/lib/python2.7/site-packages/neutron/agent/l3/router_info.py", line 660, in process_external
Nov 18 06:35:21 localhost neutron-l3-agent: 2015-11-18 06:35:21.491 57337 ERROR neutron.agent.l3.router_info     self._process_external_gateway(ex_gw_port, agent.pd)
Nov 18 06:35:21 localhost neutron-l3-agent: 2015-11-18 06:35:21.491 57337 ERROR neutron.agent.l3.router_info   File "/usr/lib/python2.7/site-packages/neutron/agent/l3/router_info.py", line 569, in _process_external_gateway
Nov 18 06:35:21 localhost neutron-l3-agent: 2015-11-18 06:35:21.491 57337 ERROR neutron.agent.l3.router_info     self.external_gateway_added(ex_gw_port, interface_name)
Nov 18 06:35:21 localhost neutron-l3-agent: 2015-11-18 06:35:21.491 57337 ERROR neutron.agent.l3.router_info   File "/usr/lib/python2.7/site-packages/neutron/agent/l3/ha_router.py", line 345, in external_gateway_added
Nov 18 06:35:21 localhost neutron-l3-agent: 2015-11-18 06:35:21.491 57337 ERROR neutron.agent.l3.router_info     self._add_gateway_vip(ex_gw_port, interface_name)
Nov 18 06:35:21 localhost neutron-l3-agent: 2015-11-18 06:35:21.491 57337 ERROR neutron.agent.l3.router_info   File "/usr/lib/python2.7/site-packages/neutron/agent/l3/ha_router.py", line 243, in _add_gateway_vip
Nov 18 06:35:21 localhost neutron-l3-agent: 2015-11-18 06:35:21.491 57337 ERROR neutron.agent.l3.router_info     self._add_default_gw_virtual_route(ex_gw_port, interface_name)
Nov 18 06:35:21 localhost neutron-l3-agent: 2015-11-18 06:35:21.491 57337 ERROR neutron.agent.l3.router_info   File "/usr/lib/python2.7/site-packages/neutron/agent/l3/ha_router.py", line 198, in _add_default_gw_virtual_route
Nov 18 06:35:21 localhost neutron-l3-agent: 2015-11-18 06:35:21.491 57337 ERROR neutron.agent.l3.router_info     instance.virtual_routes.gateway_routes = default_gw_rts
Nov 18 06:35:21 localhost neutron-l3-agent: 2015-11-18 06:35:21.491 57337 ERROR neutron.agent.l3.router_info UnboundLocalError: local variable 'instance' referenced before assignment
Nov 18 06:35:21 localhost neutron-l3-agent: 2015-11-18 06:35:21.491 57337 ERROR neutron.agent.l3.router_info
Nov 18 06:35:21 localhost neutron-l3-agent: 2015-11-18 06:35:21.493 57337 ERROR neutron.agent.l3.agent [-] Failed to process compatible router '2fca0cda-3346-458d-a0af-b6b79eccefb9'
Nov 18 06:35:21 localhost neutron-l3-agent: 2015-11-18 06:35:21.493 57337 ERROR neutron.agent.l3.agent Traceback (most recent call last):
Nov 18 06:35:21 localhost neutron-l3-agent: 2015-11-18 06:35:21.493 57337 ERROR neutron.agent.l3.agent   File "/usr/lib/python2.7/site-packages/neutron/agent/l3/agent.py", line 498, in _process_router_update
Nov 18 06:35:21 localhost neutron-l3-agent: 2015-11-18 06:35:21.493 57337 ERROR neutron.agent.l3.agent     self._process_router_if_compatible(router)
Nov 18 06:35:21 localhost neutron-l3-agent: 2015-11-18 06:35:21.493 57337 ERROR neutron.agent.l3.agent   File "/usr/lib/python2.7/site-packages/neutron/agent/l3/agent.py", line 443, in _process_router_if_compatible
Nov 18 06:35:21 localhost neutron-l3-agent: 2015-11-18 06:35:21.493 57337 ERROR neutron.agent.l3.agent     self._process_updated_router(router)
Nov 18 06:35:21 localhost neutron-l3-agent: 2015-11-18 06:35:21.493 57337 ERROR neutron.agent.l3.agent   File "/usr/lib/python2.7/site-packages/neutron/agent/l3/agent.py", line 457, in _process_updated_router
Nov 18 06:35:21 localhost neutron-l3-agent: 2015-11-18 06:35:21.493 57337 ERROR neutron.agent.l3.agent     ri.process(self)
Nov 18 06:35:21 localhost neutron-l3-agent: 2015-11-18 06:35:21.493 57337 ERROR neutron.agent.l3.agent   File "/usr/lib/python2.7/site-packages/neutron/agent/l3/ha_router.py", line 368, in process
Nov 18 06:35:21 localhost neutron-l3-agent: 2015-11-18 06:35:21.493 57337 ERROR neutron.agent.l3.agent     super(HaRouter, self).process(agent)
Nov 18 06:35:21 localhost neutron-l3-agent: 2015-11-18 06:35:21.493 57337 ERROR neutron.agent.l3.agent   File "/usr/lib/python2.7/site-packages/neutron/common/utils.py", line 359, in call
Nov 18 06:35:21 localhost neutron-l3-agent: 2015-11-18 06:35:21.493 57337 ERROR neutron.agent.l3.agent     self.logger(e)
Nov 18 06:35:21 localhost neutron-l3-agent: 2015-11-18 06:35:21.493 57337 ERROR neutron.agent.l3.agent   File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 195, in __exit__
Nov 18 06:35:21 localhost neutron-l3-agent: 2015-11-18 06:35:21.493 57337 ERROR neutron.agent.l3.agent     six.reraise(self.type_, self.value, self.tb)
Nov 18 06:35:21 localhost neutron-l3-agent: 2015-11-18 06:35:21.493 57337 ERROR neutron.agent.l3.agent   File "/usr/lib/python2.7/site-packages/neutron/common/utils.py", line 356, in call
Nov 18 06:35:21 localhost neutron-l3-agent: 2015-11-18 06:35:21.493 57337 ERROR neutron.agent.l3.agent     return func(*args, **kwargs)
Nov 18 06:35:21 localhost neutron-l3-agent: 2015-11-18 06:35:21.493 57337 ERROR neutron.agent.l3.agent   File "/usr/lib/python2.7/site-packages/neutron/agent/l3/router_info.py", line 694, in process
Nov 18 06:35:21 localhost neutron-l3-agent: 2015-11-18 06:35:21.493 57337 ERROR neutron.agent.l3.agent     self.process_external(agent)
Nov 18 06:35:21 localhost neutron-l3-agent: 2015-11-18 06:35:21.493 57337 ERROR neutron.agent.l3.agent   File "/usr/lib/python2.7/site-packages/neutron/agent/l3/router_info.py", line 660, in process_external
Nov 18 06:35:21 localhost neutron-l3-agent: 2015-11-18 06:35:21.493 57337 ERROR neutron.agent.l3.agent     self._process_external_gateway(ex_gw_port, agent.pd)
Nov 18 06:35:21 localhost neutron-l3-agent: 2015-11-18 06:35:21.493 57337 ERROR neutron.agent.l3.agent   File "/usr/lib/python2.7/site-packages/neutron/agent/l3/router_info.py", line 569, in _process_external_gateway
Nov 18 06:35:21 localhost neutron-l3-agent: 2015-11-18 06:35:21.493 57337 ERROR neutron.agent.l3.agent     self.external_gateway_added(ex_gw_port, interface_name)
Nov 18 06:35:21 localhost neutron-l3-agent: 2015-11-18 06:35:21.493 57337 ERROR neutron.agent.l3.agent   File "/usr/lib/python2.7/site-packages/neutron/agent/l3/ha_router.py", line 345, in external_gateway_added
Nov 18 06:35:21 localhost neutron-l3-agent: 2015-11-18 06:35:21.493 57337 ERROR neutron.agent.l3.agent     self._add_gateway_vip(ex_gw_port, interface_name)
Nov 18 06:35:21 localhost neutron-l3-agent: 2015-11-18 06:35:21.493 57337 ERROR neutron.agent.l3.agent   File "/usr/lib/python2.7/site-packages/neutron/agent/l3/ha_router.py", line 243, in _add_gateway_vip
Nov 18 06:35:21 localhost neutron-l3-agent: 2015-11-18 06:35:21.493 57337 ERROR neutron.agent.l3.agent     self._add_default_gw_virtual_route(ex_gw_port, interface_name)
Nov 18 06:35:21 localhost neutron-l3-agent: 2015-11-18 06:35:21.493 57337 ERROR neutron.agent.l3.agent   File "/usr/lib/python2.7/site-packages/neutron/agent/l3/ha_router.py", line 198, in _add_default_gw_virtual_route
Nov 18 06:35:21 localhost neutron-l3-agent: 2015-11-18 06:35:21.493 57337 ERROR neutron.agent.l3.agent     instance.virtual_routes.gateway_routes = default_gw_rts
Nov 18 06:35:21 localhost neutron-l3-agent: 2015-11-18 06:35:21.493 57337 ERROR neutron.agent.l3.agent UnboundLocalError: local variable 'instance' referenced before assignment
Comment 1 Leonid Natapov 2015-11-18 09:36:36 EST
https://bugs.launchpad.net/neutron/+bug/1515209
Comment 2 Assaf Muller 2015-11-18 10:36:46 EST
No need to track this downstream.

Note You need to log in before you can comment on or make changes to this bug.