commit 7c874cd89ac2b697fce71307e05af2c390d07173
Author: Daniel Gonzalez <email address hidden>
Date: Mon Mar 12 17:48:54 2018 +0100
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.
Reviewed: https:/ /review. openstack. org/577380 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=7c874cd89ac 2b697fce71307e0 5af2c390d07173
Committed: https:/
Submitter: Zuul
Branch: stable/ocata
commit 7c874cd89ac2b69 7fce71307e05af2 c390d07173
Author: Daniel Gonzalez <email address hidden>
Date: Mon Mar 12 17:48:54 2018 +0100
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 l3_agents_ per_router set to 3, it may happen that the loadbalancer
running on 'dvr_snat' agents. E.g. when deploying a loadbalancer with
neutron-lbaas in a landscape with 6 network nodes and
max_
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.
Conflicts: agent/l3/ agent.py tests/functiona l/agent/ l3/test_ dvr_router. py
neutron/
neutron/
Change-Id: I755990324db445 efd0ee0b8a9db1f 4d7bfb58e26 c20331de4b8a917 ec3ae0e6f6)
Closes-Bug: #1755243
(cherry picked from commit 8c2dae659a806fd