OpenStack Networking (Neutron)
Go to file
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
api-ref Fix some typos 2016-06-28 22:46:19 +02:00
bin XenAPI: add support for conntrack with XenServer 2016-09-23 02:34:25 +00:00
devstack Merge "Install OVS from git if current version < 2.5.1" 2016-11-16 15:28:17 +00:00
doc Update devref examples about alembic migrations 2016-11-16 22:17:37 -05:00
etc Merge "iptables: fail to start ovs/linuxbridge agents on missing sysctl knobs" 2016-10-21 02:14:02 +00:00
neutron Metering: sync only active routers hosted on the same host 2016-11-21 19:44:22 +00:00
rally-jobs Add a trunk rally test 2016-11-14 23:59:56 +00:00
releasenotes Merge "Deprecate SR-IOV 'physical_device_mappings' config option" 2016-11-13 17:22:46 +00:00
tools Merge "Remove duplicated tool" 2016-11-11 22:26:52 +00:00
.coveragerc Cleanup coverage configuration 2016-10-17 17:06:19 +05:30
.gitignore Automatically generate neutron core configuration files 2015-11-27 15:22:59 +00:00
.gitreview Fix .gitreview to not point at a branch 2015-08-17 13:51:51 -06:00
.mailmap Add mailmap entry 2014-05-16 13:40:04 -04:00
.pylintrc Remove last vestiges of oslo-incubator 2016-11-04 20:49:13 -04:00
.testr.conf Allow more time for DB migration tests 2016-09-21 20:54:41 -04:00
CONTRIBUTING.rst Make crystal clear how to contribute/approach the neutron community 2016-10-28 11:49:44 -07:00
HACKING.rst Switch to new hacking 0.12 2016-11-08 03:36:00 +00:00
LICENSE Adding Apache Version 2.0 license file. This is the official license agreement under which Quantum code is available to 2011-08-08 12:31:04 -07:00
README.rst Fix specs broken link 2016-10-28 14:39:49 -07:00
TESTING.rst Add rally hook to neutron devstack plugin 2016-11-10 07:44:28 +00:00
babel.cfg Use babel to generate translation file 2013-01-24 00:20:32 +08:00
bindep.txt Fix periodic jobs: Add databases to bindep.txt 2016-10-09 06:31:00 +02:00
requirements.txt Updated from global requirements 2016-11-14 21:07:37 +00:00
run_tests.sh Removed unnecessary file(openstack/common) in run_stack.sh 2016-10-20 16:33:23 +05:30
setup.cfg SR-IOV: Remove deprecated supported_pci_vendor_devs option 2016-10-31 18:33:26 +02:00
setup.py Updated from global requirements 2015-09-21 18:56:49 +00:00
test-requirements.txt Switch to new hacking 0.12 2016-11-08 03:36:00 +00:00
tox.ini Switch to new hacking 0.12 2016-11-08 03:36:00 +00:00

README.rst

Welcome!

To learn more about neutron:

Get in touch via email. Use [Neutron] in your subject.

To learn how to contribute:

CONTRIBUTING.rst