neutron/neutron/tests/functional/agent
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
..
l2 Adding DSCP mark and inheritance in OVS and LB tunnels outer header 2018-01-17 10:54:46 +01:00
l3 Fix l3-agent crash on routers without ha_state 2018-03-23 12:57:01 +01:00
linux Additional functional tests for ip_lib.IpAddrCommand 2018-03-08 12:15:19 +01:00
windows Add IPLink class to Windows ip_lib implementation 2017-01-17 17:39:38 +00:00
__init__.py Empty files should not contain copyright or license 2014-10-20 00:50:32 +00:00
test_dhcp_agent.py Change ip_lib network namespace code to use pyroute2 2017-10-04 21:09:28 +00:00
test_firewall.py use EGRESS_DIRECTION and INGRESS_DIRECTION from neutron-lib 2018-02-23 10:36:36 -07:00
test_l2_lb_agent.py LB Trunk: Stop matching MAC of subport to port model 2017-03-01 14:10:00 +00:00
test_l2_ovs_agent.py Use flake8-import-order plugin 2017-07-05 03:15:27 +00:00
test_ovs_flows.py of_interface: allow install_instructions to accept string actions 2017-06-30 15:55:33 +09:00
test_ovs_lib.py Merge "Fix ingress bw limit for OVS DPDK ports" 2018-01-18 18:07:39 +00:00