7962dd49ef
When syncing data from neutron server, metering-agent may receive information about routers that are not hosted by the l3-agent on the same host, because the server didn't filter them out. This could lead to the following problems: * metering-agent tries to setup iptables rules for a router that is not on the host * metering-agent tries to get get traffic counters for a router that was once on the host but is already removed * metering-agent not sets up iptables rules for a router that is removed then added back to the host, because nothing about the router is changed from metering-agent's perspective This commit fixes the aforementioned problems by making metering-agent only receive information about routers that are on the same host, and update metering-agent's knowledge about which routers it should care. However, there could still be problem if one removes then adds a router back to the same l3-agent, or just sets the router's admin_state_up property to False then True in a short time(shorter than the interval between two syncs). Because the metering-agent sees nothing changed while during the same time the router's namespace is removed and added back on the host. Thus metering-agent will fail to get such router's traffic counters. This commit also make iptables-driver to forget such routers and leave the metering-agent to reconfigure them later. Closes-Bug: #1580548 Change-Id: Ia6ae82c676582b06710d6f96b9938c215258182d Signed-off-by: Hunt Xu <mhuntxu@gmail.com> |
||
---|---|---|
.. | ||
agents | ||
drivers | ||
__init__.py | ||
metering_plugin.py |