]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Fix AttributeError when setting external gateway on DVR router
authorarmando-migliaccio <armamig@gmail.com>
Tue, 5 Aug 2014 19:35:37 +0000 (12:35 -0700)
committerarmando-migliaccio <armamig@gmail.com>
Fri, 5 Sep 2014 22:24:01 +0000 (15:24 -0700)
commit608003408b3aba6a8290427257460287d8a4ce96
treecf80483c4a71253570c0966b6014ce6e60de26bc
parentb6afc3c9cb5ee7a7a7aa341d09fd4a0590e8d6cb
Fix AttributeError when setting external gateway on DVR router

DVR routers will have this manager initialized only after one
or more subnets have been attached to the router. To address
the issue, make sure the manager is defined and handle the snat
rules appropriately.

This patch also makes _update_arp_entry more defensive; this is
because the arp update process can be affected by the same issue:
the router may not have internal ports at the time the request
come in. This is likely when VM's port creation and router
configuration overlap slightly.

Closes-bug: #1353006

Change-Id: Ib46852f5b264e5ef2e2d499d3351f8974e393011
Co-authored-by: Rajeev Grover <rajeev.grover@hp.com>
neutron/agent/l3_agent.py
neutron/tests/unit/test_l3_agent.py