neutron/neutron/agent
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
..
common ovsfw: Use bundle when adding security group rules 2018-03-08 14:31:06 +00:00
dhcp Spawn/stop metadata proxies upon adding/deleting router interfaces 2018-03-26 20:46:52 +00:00
l2 use qos constants from neutron-lib 2017-10-26 19:57:19 +00:00
l3 Fix l3-agent crash on routers without ha_state 2018-03-30 17:55:06 +00:00
linux Merge "Process conntrack updates in worker threads" into stable/queens 2018-03-27 19:47:48 +00:00
metadata Add log-tag to haproxy config file 2018-01-22 09:07:03 -05:00
ovsdb Merge "Fixes using SSL OVSDB connection" 2018-02-09 09:04:26 +00:00
windows Refactoring agent linux&ovsdb config 2017-08-25 10:41:39 -04:00
__init__.py Empty files should not contain copyright or license 2014-10-20 00:50:32 +00:00
agent_extension.py Generalize agent extension mechanism 2016-07-19 13:45:22 +00:00
agent_extensions_manager.py Make code follow log translation guideline 2017-08-14 02:01:48 +00:00
dhcp_agent.py Change ip_lib network namespace code to use pyroute2 2017-10-04 21:09:28 +00:00
firewall.py consume load_class_by_alias_or_classname from neutron-lib 2017-10-21 06:01:15 -06:00
l3_agent.py Refactoring agent linux&ovsdb config 2017-08-25 10:41:39 -04:00
metadata_agent.py Remove deprecated cache_url 2017-11-10 00:47:19 -05:00
resource_cache.py Merge "Fix race condition with enabling SG on many ports at once" 2018-01-27 10:36:37 +00:00
rpc.py remove neutron.callbacks package 2018-01-16 09:32:32 -07:00
securitygroups_rpc.py Iptables firewall driver adds forward rules for trusted ports 2018-03-25 09:56:10 +00:00