neutron/neutron
Daniel Gonzalez da141f0859 Fix l3-agent crash on routers without ha_state
l3-agent checks the HA state of routers when a router is updated.
To ensure that the HA state is only checked on HA routers the following
check is performed: `if router.get('ha') and not is_dvr_only_agent`.
This check should ensure that the check is only performed on
DvrEdgeHaRouter and HaRouter objects.

Unfortunately, there are cases where we have DvrEdgeRouter objects
running on 'dvr_snat' agents. E.g. when deploying a loadbalancer with
neutron-lbaas in a landscape with 6 network nodes and
max_l3_agents_per_router set to 3, it may happen that the loadbalancer
is placed on a network node that does not have a DvrEdgeHaRouter running
on it. In such a case, neutron will deploy a DvrEdgeRouter object on the
network node to serve the loadbalancer, just like it would deploy a
DvrEdgeRouter on a compute node when deploying a VM.

Under such circumstances each update to the router will lead to an
AttributeError, because the DvrEdgeRouter object does not have the
ha_state attribute.

This patch circumvents the issue by doing an additional check on the
router object to ensure that it actually has the ha_state attribute.

Closes-Bug: #1755243
Change-Id: I755990324db445efd0ee0b8a9db1f4d7bfb58e26
(cherry picked from commit 8c2dae659a)
2018-03-30 17:55:06 +00:00
..
agent Fix l3-agent crash on routers without ha_state 2018-03-30 17:55:06 +00:00
api remove neutron.callbacks package 2018-01-16 09:32:32 -07:00
cmd More efficiently clean up OVS ports 2018-01-22 14:07:42 -06:00
common Fix error message when duplicate QoS rule is created 2018-02-14 15:01:20 +00:00
conf Fixes using SSL OVSDB connection 2018-02-09 04:50:10 +00:00
core_extensions use qos constants from neutron-lib 2017-10-26 19:57:19 +00:00
db Merge "Fixing the filter in get MTU by network list query." into stable/queens 2018-03-07 20:56:57 +00:00
debug Change ip_lib network namespace code to use pyroute2 2017-10-04 21:09:28 +00:00
extensions Support filtering port with IP address substring 2018-01-12 18:22:06 +00:00
hacking hacking: Remove dead code 2017-07-19 13:43:44 +02:00
ipam Always pass device_owner to _ipam_get_subnets() 2018-02-17 18:31:50 +00:00
locale Imported Translations from Zanata 2018-03-14 06:20:49 +00:00
notifiers use callback payloads for REQUEST/RESPONSE events 2017-12-24 07:27:11 +00:00
objects Fix error message when duplicate QoS rule is created 2018-02-14 15:01:20 +00:00
pecan_wsgi Fixes minor typo in neutron 2018-01-18 14:27:59 +08:00
plugins Config privsep in the linuxbridge agent 2018-03-12 14:29:48 -04:00
privileged Change ip_lib network namespace code to use pyroute2 2017-10-04 21:09:28 +00:00
quota CountableResource: try count/get functions for all plugins 2017-09-08 10:50:12 -07:00
scheduler Merge "use l3 api def from neutron-lib" 2017-12-16 13:01:14 +00:00
server Make code follow log translation guideline 2017-08-14 02:01:48 +00:00
services Merge "Fix error message when duplicate QoS rule is created" into stable/queens 2018-03-07 19:22:59 +00:00
tests Fix l3-agent crash on routers without ha_state 2018-03-30 17:55:06 +00:00
__init__.py
_i18n.py Make code follow log translation guideline 2017-08-14 02:01:48 +00:00
auth.py Use oslo.context class method to construct context object 2017-03-23 09:02:46 +00:00
manager.py Do not load default service plugins if core plugin is not DB based 2017-11-09 20:34:52 +00:00
neutron_plugin_base_v2.py Do not load default service plugins if core plugin is not DB based 2017-11-09 20:34:52 +00:00
opts.py Merge "Remove deprecated cache_url" 2018-01-03 06:35:59 +00:00
policy.py Merge "Log policy filters in one line" 2017-08-23 11:09:37 +00:00
service.py use callback payloads for _SPAWN events 2017-12-21 11:03:36 -07:00
version.py
worker.py replace WorkerSupportServiceMixin with neutron-lib's WorkerBase 2017-06-14 06:56:48 -06:00
wsgi.py Make code follow log translation guideline 2017-08-14 02:01:48 +00:00