neutron/neutron/tests
Hunt Xu 7962dd49ef Metering: sync only active routers hosted on the same host
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>
2016-11-21 19:44:22 +00:00
..
common Merge "fullstack: test for IPv6 north-south traffic" 2016-11-09 12:02:45 +00:00
contrib Install OVS from git if current version < 2.5.1 2016-11-16 14:24:31 +02:00
etc Remove FWaaS policy.json entries 2016-09-06 21:30:41 +00:00
fullstack Merge "fullstack: test for IPv6 north-south traffic" 2016-11-09 12:02:45 +00:00
functional Merge "Elimination duplication of lots of DVR tests" 2016-11-21 09:19:42 +00:00
retargetable Forbid importing neutron.tests.* from outside tests subtree 2016-09-15 18:42:45 +00:00
tempest Disallow specifying too long name and description for qos 2016-11-18 11:21:57 +07:00
unit Metering: sync only active routers hosted on the same host 2016-11-21 19:44:22 +00:00
var
__init__.py Avoid eventlet monkey patching for the tempest plugin 2016-04-29 22:47:24 -05:00
base.py Use ensure_tree from oslo_utils.fileutils 2016-11-05 00:00:31 -07:00
fake_notifier.py
post_mortem_debug.py
tools.py Agent to OVO 2016-11-10 07:25:17 +00:00