]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
always push down metadata rules for router, not just if gateway exists
authorDan Wendlandt <dan@nicira.com>
Mon, 17 Sep 2012 16:29:35 +0000 (09:29 -0700)
committerDan Wendlandt <dan@nicira.com>
Mon, 17 Sep 2012 16:29:35 +0000 (09:29 -0700)
commitf6e9158d6ff5afeae2712cf4d8c2e0de4dc500b0
tree6fdeac2d423852c577f9654feab3abfd0ee52445
parent2d20ad3588e2cb2d585699d51ee8167025e3d736
always push down metadata rules for router, not just if gateway exists

bug 1051842

the l3-agent only pushes down some of the DNAT rules for metadata mapping
if there is a gateway set on a router. However, the nova-api server could
itself be running in the local router namespace (or on the same box as
the quantum-l3-agent in the case were namespaces are disabled. In fact,
with namespaces disabled, this is the likely setup for a simple
environment). Thus, we should simply always push down the metadata nat
rules for a router, router than waiting until a gateway is added.

This patch also refactors the actions taken by the l3-agent when a router
is added or removed into a separate function for improved readability,
as add/removing the nat rules made these code segments even longer.

Change-Id: I3c6eb35b51df3babf747dbcff7f943b850e69838
quantum/agent/l3_agent.py