neutron/neutron
Daniel Gonzalez 8c2dae659a 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.

Change-Id: I755990324db445efd0ee0b8a9db1f4d7bfb58e26
Closes-Bug: #1755243
2018-03-23 12:57:01 +01:00
..
agent Fix l3-agent crash on routers without ha_state 2018-03-23 12:57:01 +01:00
api remove SHARED constant that now lives in neutron-lib 2018-03-08 09:30:53 -07:00
cmd More efficiently clean up OVS ports 2018-01-22 14:07:42 -06:00
common use DVR constants from neutron-lib 2018-02-23 09:17:02 -07:00
conf use DVR constants from neutron-lib 2018-02-23 09:17:02 -07:00
core_extensions use qos constants from neutron-lib 2017-10-26 19:57:19 +00:00
db Merge "Use Meter Label OVO in neutron/db/metering/metering_db.py" 2018-03-08 16:10:59 +00:00
debug Change ip_lib network namespace code to use pyroute2 2017-10-04 21:09:28 +00:00
extensions Merge "use revision if match api def from neutron-lib" 2018-03-08 11:13:10 +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-12 15:38:24 -05:00
locale Imported Translations from Zanata 2018-03-03 06:08:46 +00:00
notifiers use callback payloads for REQUEST/RESPONSE events 2017-12-24 07:27:11 +00:00
objects Merge "Ensure _get_changed_synthetic_fields() return updatable fields" 2018-03-12 07:59:41 +00:00
pecan_wsgi Fixes minor typo in neutron 2018-01-18 14:27:59 +08:00
plugins Merge "Fix delete vlan allocation error for ML2" 2018-03-09 15:29:19 +00: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 Make log extension more generic 2018-03-08 16:58:01 +07:00
tests Fix l3-agent crash on routers without ha_state 2018-03-23 12:57:01 +01:00
__init__.py Hacking rule to check i18n usage 2016-03-30 21:28:37 -04:00
_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