neutron/neutron/agent/l3
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
..
extensions use DVR constants from neutron-lib 2018-02-23 09:17:02 -07:00
__init__.py Move classes out of l3_agent.py 2014-12-10 15:19:28 -07:00
agent.py Fix l3-agent crash on routers without ha_state 2018-03-23 12:57:01 +01:00
dvr.py Clean-up L3 constant TODOs 2016-12-14 11:54:12 -05:00
dvr_edge_ha_router.py Add/rm centralized fips for DVR+HA from standby node 2018-02-05 17:28:23 +08:00
dvr_edge_router.py use DVR constants from neutron-lib 2018-02-23 09:17:02 -07:00
dvr_fip_ns.py Fix callers of get_devices_with_ip() to pass addresses 2017-10-31 16:20:28 -04:00
dvr_local_router.py use DVR constants from neutron-lib 2018-02-23 09:17:02 -07:00
dvr_router_base.py Make code follow log translation guideline 2017-08-14 02:01:48 +00:00
dvr_snat_ns.py Merge "DVR: properly track SNAT traffic" 2017-04-25 13:05:32 +00:00
fip_rule_priority_allocator.py Fix two spelling mistakes 2016-05-30 01:58:04 +00:00
ha.py Add a new method ha_state_change to L3 agent extension 2017-10-18 09:41:38 +07:00
ha_router.py Merge "Fix callers of get_devices_with_ip() to pass addresses" 2018-01-05 07:53:02 +00:00
item_allocator.py Make code follow log translation guideline 2017-08-14 02:01:48 +00:00
keepalived_state_change.py Make code follow log translation guideline 2017-08-14 02:01:48 +00:00
l3_agent_extension.py Add a new method ha_state_change to L3 agent extension 2017-10-18 09:41:38 +07:00
l3_agent_extension_api.py Merge "Add a new method get_router_info to L3 agent extension API" 2017-10-22 17:00:22 +00:00
l3_agent_extensions_manager.py Add a new method ha_state_change to L3 agent extension 2017-10-18 09:41:38 +07:00
legacy_router.py Remove deprecated send_arp_for_ha option 2017-04-18 13:38:35 -04:00
link_local_allocator.py spelling error: 2016-06-30 10:17:18 +08:00
namespace_manager.py Change ip_lib network namespace code to use pyroute2 2017-10-04 21:09:28 +00:00
namespaces.py Make code follow log translation guideline 2017-08-14 02:01:48 +00:00
router_info.py Update some l3-agent log messages 2017-12-14 09:24:39 -05:00
router_processing_queue.py Move check_ha_state_for_router() into notification code 2017-11-07 13:10:55 -05:00