Brian Haley [Thu, 13 Aug 2015 20:57:59 +0000 (16:57 -0400)]
Remove 'action' argument from _handle_fip_nat_rules()
There's only one caller of _handle_fip_nat_rules(), and they
always specify 'add_rules' as the argument, so it's not
necessary any more. Also, the interface passed must be valid
since the caller has already used it, and would have thrown
an exception before this call was made. Found during another
code review.
Guard against potential down_revision interleave by checking that each
revision has the only revision that corresponds to its location in the
migration tree, and that its parent also has that same single label.
Henry Gessau [Sun, 5 Jul 2015 07:29:38 +0000 (03:29 -0400)]
Support for independent alembic branches in sub-projects
Sub-projects shall now register their independent alembic migrations
via entrypoints in setup.cfg, and neutron-db-manage will discover them
and run them automatically.
If a service or sub-project is specified explicitly, then
neutron-db-manage will run on only that service or sub-project.
The advanced services project are just special cases of sub-projects.
For example, specifying the CLI option '--service lbaas' is the same
as specifying '--subproject neutron-lbaas'.
Specifying no service or sub-project will cause neutron-db-manage to
run the command on neutron and all installed sub-projects.
Added and consolidated documentation into devref for alembic migrations.
Kanzhe Jiang [Thu, 13 Aug 2015 03:36:54 +0000 (20:36 -0700)]
Remove bigswitch mech_driver entry point definition
After vendor driver split, the entry point for bigswitch ml2
mechanism_driver is no longer valid. The new entry point is defined in
the networking-bigswitch stackforge repo.
Improve callback registry devref documentation and usability
Latest developments have revealed that the registry can be misused
under certain circumstances, and that it can be harder to use by
projects that extend Neutron.
This patch improves the devref documentation so that developers know
what to expect.
Fix DVR interface delete by port when gateway is set
When removing a DVR interface by port, the subnet_id
passed to delete_csnat_router_interface_ports is None,
and so it deletes all the DVR SNAT ports for the
router.
This patch fixes this issue by passing in the right
subnet_id to the delete_csnat_router_interface_ports.
shihanzhang [Tue, 9 Jun 2015 09:47:39 +0000 (17:47 +0800)]
Destroy ipset when the corresponding rule is removed
if a security group has a rule which allow a remote group access,
but this remote group has no IPv4 and IPv6 members, L2 agent
should not clear the remote group in internal cache of sg_members,
because when above rule is deleted, L2 agent can get the remote group
id from the diff of pre_sg_members-sg_members, then destroy the ipset
set for remote group.
Assaf Muller [Tue, 11 Aug 2015 18:20:07 +0000 (14:20 -0400)]
Clean up test_dvr_router_rem_fips_on_restarted_agent
* self._add_fip wasn't actually doing anything useful, it just
throws off the reader by making him/her think that line is
important when it isn't.
* Added an assertion that checks that the FIP namespace exists
before the reconfiguration of the router.
John Davidge [Tue, 11 Aug 2015 12:55:51 +0000 (13:55 +0100)]
Fix _update_subnet_allocation_pools returning empty list
_update_subnet_allocation_pools was returning an empty list in all
cases due to trying to iterate over the same generator twice.
Generators cannot be iterated over multiple times.
This patch changes the generator into a list to fix this problem,
and alters the unit test so that this issue is exposed.
Kevin Benton [Tue, 11 Aug 2015 13:01:25 +0000 (06:01 -0700)]
Replace 'import json' with oslo_serialization
Replace remaining occurences of 'import json' with
'from oslo_serialization import jsonutils as json'
so pylint doesn't complain every time someone happens
to make a change to one of the modules that still
uses it.
This patch is in preparation for the integration
of Ironic and Neutron. A new vnic_type is being
added so that ML2 drivers can filter for all
Ironic ports based upon match for 'baremetal'.
Nova/Ironic will set this vnic_type when issuing
port-create request to neutron.
(e.g. binding:vnic_type = 'baremetal' )
Fix scheduling of DVR routers to not stop scheduling once
csnat portion was scheduled. See bug report for failing
scenario.
This partially reverts
commit 3794b4a83e68041e24b715135f0ccf09a5631178
and fixes bug 1374473 by moving csnat scheduling
after general dvr router scheduling, so double binding does
not happen.
Sergey Vilgelm [Mon, 10 Aug 2015 12:46:27 +0000 (15:46 +0300)]
Use oslo.log library instead of system logging module
The constants of log levels were added in the 1.8 version of
the oslo.log library. So we can replace all usage of system
logging module with log module from oslo.log.
sridhargaddam [Wed, 5 Aug 2015 10:49:33 +0000 (10:49 +0000)]
Avoid dhcp_release for ipv6 addresses
dhcp_release is only supported for IPv4 addresses [1] and not for
IPv6 addresses [2]. There will be no effect when it is called with
IPv6 address. This patch adds a corresponding note and avoids calling
dhcp_release for IPv6 addresses.
Henry Gessau [Tue, 4 Aug 2015 03:30:34 +0000 (23:30 -0400)]
Consistent layout and headings for devref
The lack of convention for heading levels among the independently
written devref documents was starting to make the Table of Contents
look rather messy when rendered in HTML.
This patch does not cover the "Neutron Internals" section since its
layout is reasonably OK for now.
Oleg Bondarev [Fri, 7 Aug 2015 16:56:13 +0000 (19:56 +0300)]
Do not delete fip namespace during l3 dvr agent resync
This was introduced by commit 46608806aa7a9c60214e28429ca5a8b87b2a15de
which didn't take into account that fip namespace name is composed
from external network id rather than router id.
The fix is to ensure fip namespaces for the known routers are kept
by namespace manager on agent resync.
John Kasperski [Fri, 7 Aug 2015 14:15:33 +0000 (09:15 -0500)]
Validate updated allocation pool before using it
The allocation pool specified during subnet-update is being
used in gateway validation checks before the allocation pool
is ever validated. Errors indicating that the gateway IP is
invalid are returned when it is the allocation pool that is
actually in error.
Additional testing of the allocation pool is also being added
to the subnet-update unit tests.
Yalei Wang [Wed, 5 Aug 2015 17:03:20 +0000 (01:03 +0800)]
Pass the extension driver exception to plugin
The extension driver is intercepted by driver manager currently. It will
cover the errors/exceptions happened in extension drivers. The extension
process will continue even if preceding extension driver get a wrong/useless
extended result, or even no result.
This patch make process_[create|update]_<resource>() and
extend_<resource>_dict() methods return the exception, and log it with proper
level respectively, and also include a minor optimization for the
extend_<resource>_dict() methods.
leejian0612 [Wed, 5 Aug 2015 08:00:35 +0000 (16:00 +0800)]
Broadcast service port's arp in DVR
When creating VMs, DVR router will broadcast VM's arp details to all the
l3 agents hosting it. that enable dvr can forwarding networking traffic
in link layer, but when the port is attached to the service liking
lbaas, their arp will not be broadcast, so the dvr do not know its mac,
and will cause that vms in other subnet can not reach the service port
through the dvr router.