]> review.fuel-infra Code Review - openstack-build/neutron-build.git/log
openstack-build/neutron-build.git
9 years agoMerge "Different approach to indicate failure on SystemExit"
Jenkins [Thu, 16 Jul 2015 06:57:16 +0000 (06:57 +0000)]
Merge "Different approach to indicate failure on SystemExit"

9 years agoMerge "Avoid using logging in signal handler"
Jenkins [Thu, 16 Jul 2015 05:55:01 +0000 (05:55 +0000)]
Merge "Avoid using logging in signal handler"

9 years agoMerge "Fix a regression in a recent IPAM change"
Jenkins [Thu, 16 Jul 2015 02:50:22 +0000 (02:50 +0000)]
Merge "Fix a regression in a recent IPAM change"

9 years agoMerge "Create dvr base class and stop passing around snat_ports"
Jenkins [Thu, 16 Jul 2015 00:24:55 +0000 (00:24 +0000)]
Merge "Create dvr base class and stop passing around snat_ports"

9 years agoMerge "populate port security default into network"
Jenkins [Thu, 16 Jul 2015 00:05:15 +0000 (00:05 +0000)]
Merge "populate port security default into network"

9 years agoMerge "Remove db-access semaphore in ML2"
Jenkins [Wed, 15 Jul 2015 21:58:42 +0000 (21:58 +0000)]
Merge "Remove db-access semaphore in ML2"

9 years agoMerge "Fix update_port_postcommit and port not found with DVR"
Jenkins [Wed, 15 Jul 2015 19:42:08 +0000 (19:42 +0000)]
Merge "Fix update_port_postcommit and port not found with DVR"

9 years agoCreate dvr base class and stop passing around snat_ports
Carl Baldwin [Thu, 9 Jul 2015 22:05:05 +0000 (22:05 +0000)]
Create dvr base class and stop passing around snat_ports

The one thing that I see that the two dvr classes have in common is
the ability to map internal ports to snat ports.  The dvr local router
needs it to set up a redirect to the central part.  The central part
needs it to create the port for the internal network.

This change renames the mapping method to something more logical and
removes snat_ports as an argument to two methods because it is a quick
O(1) operation to get it from the router dict and passing it around
just tangles things up.

Change-Id: Icc099c1a97e3e68eeaf4690bc83167ba30d8099a

9 years agoMerge "Improve check_migration command error message"
Jenkins [Wed, 15 Jul 2015 16:28:23 +0000 (16:28 +0000)]
Merge "Improve check_migration command error message"

9 years agoMerge "Correct two spelling mistakes in Neutron devrefs"
Jenkins [Wed, 15 Jul 2015 15:25:21 +0000 (15:25 +0000)]
Merge "Correct two spelling mistakes in Neutron devrefs"

9 years agoMerge "Move pylint dep from tox.ini to test-requirements"
Jenkins [Wed, 15 Jul 2015 15:03:27 +0000 (15:03 +0000)]
Merge "Move pylint dep from tox.ini to test-requirements"

9 years agoMerge "bugs: Update info about current bug czar"
Jenkins [Wed, 15 Jul 2015 13:42:35 +0000 (13:42 +0000)]
Merge "bugs: Update info about current bug czar"

9 years agoMerge "Fix SR-IOV mechanism driver tests directory"
Jenkins [Wed, 15 Jul 2015 13:36:53 +0000 (13:36 +0000)]
Merge "Fix SR-IOV mechanism driver tests directory"

9 years agoMerge "Galera multi-writers compliant sync_allocations"
Jenkins [Wed, 15 Jul 2015 13:35:11 +0000 (13:35 +0000)]
Merge "Galera multi-writers compliant sync_allocations"

9 years agoMerge "[neutron-db-manage] support separate migration branches"
Jenkins [Wed, 15 Jul 2015 12:59:13 +0000 (12:59 +0000)]
Merge "[neutron-db-manage] support separate migration branches"

9 years agoMerge "Switch to the oslo_utils.fileutils"
Jenkins [Wed, 15 Jul 2015 12:54:48 +0000 (12:54 +0000)]
Merge "Switch to the oslo_utils.fileutils"

9 years agoCorrect two spelling mistakes in Neutron devrefs
Neil Jerram [Wed, 15 Jul 2015 11:19:23 +0000 (12:19 +0100)]
Correct two spelling mistakes in Neutron devrefs

Change-Id: Ia15c82363972845c70e773d85aa3be3beb2e0eb5

9 years agoImprove check_migration command error message
Cedric Brandily [Tue, 7 Jul 2015 12:23:12 +0000 (12:23 +0000)]
Improve check_migration command error message

This change adds some details (expected heads) to the error raised by
neutron-db-manage check_migration command in order to help debugging.

Change-Id: Icfc6fc5722b5a3b7c4a36131553eeba0941d12e3

9 years agoAvoid using logging in signal handler
shihanzhang [Tue, 14 Jul 2015 09:32:48 +0000 (17:32 +0800)]
Avoid using logging in signal handler

In some cases, logging can grab locks and thusly attempt to reschedule,
which will fail in signal handlers. this patch removes the actions
from the signal handers, just set a flat if it got a signal, then in
rpc_loop, check the flag and perform appropriate actions.

Change-Id: I7a477e1c95b63fa8070ec9d08656156571421bb6
Partial-Bug: #1029727

9 years agoMerge "Tighten exception handler for import_object"
Jenkins [Wed, 15 Jul 2015 08:41:58 +0000 (08:41 +0000)]
Merge "Tighten exception handler for import_object"

9 years agoGalera multi-writers compliant sync_allocations
Cedric Brandily [Tue, 16 Jun 2015 07:42:35 +0000 (09:42 +0200)]
Galera multi-writers compliant sync_allocations

Currently sync_allocations[1] uses with_lockmode('update) which implies
possible deadlocks with Galera multi-writers. This change decorates the
method in order to catch and retry sync_allocations.

[1] neutron.plugins.ml2.drivers.type_tunnel

Change-Id: Ic01614cb5daf174848cf14a6aa4b38c4ed40fe1e

9 years agoFix SR-IOV mechanism driver tests directory
Aviram Bar-Haim [Wed, 15 Jul 2015 07:41:12 +0000 (10:41 +0300)]
Fix SR-IOV mechanism driver tests directory

This patch adds mising __init__ to mech_sriov/mech_driver/ tests directory.

Trivial Fix

Change-Id: Ie048eaeed6cfa923e09c4260a56f654a74307715

9 years agoSwitch to the oslo_utils.fileutils
Sergey Vilgelm [Wed, 8 Jul 2015 12:51:14 +0000 (15:51 +0300)]
Switch to the oslo_utils.fileutils

fileutils is graduated in the oslo.utils library.

Implements: blueprint graduate-fileutils[1]
[1] https://blueprints.launchpad.net/oslo-incubator/+spec/graduate-fileutils

Depends-On: I51ba9076e1fbc16145ee2311f47b7768c16dcb20 (requirements)

Change-Id: I933d02aa48260069149d16caed02b020296b943a

9 years agoFix a regression in a recent IPAM change
YAMAMOTO Takashi [Wed, 15 Jul 2015 03:48:38 +0000 (12:48 +0900)]
Fix a regression in a recent IPAM change

The change I81806a43ecc6f0a7b293ce3e70d09d1e266b9f02
effectively removed _delete_port from NeutronDbPluginV2.
Unfortunately, it's still used directly by l3_dvr_db.

Closes-Bug: #1474639
Change-Id: I6ffb1d2d6f072ac1669637943eacad182244ca5c

9 years agoMerge "Abstract sync_allocations"
Jenkins [Wed, 15 Jul 2015 00:24:24 +0000 (00:24 +0000)]
Merge "Abstract sync_allocations"

9 years agoMerge "Cleanup unused method get_plugin_version"
Jenkins [Wed, 15 Jul 2015 00:10:10 +0000 (00:10 +0000)]
Merge "Cleanup unused method get_plugin_version"

9 years agoMerge "Register extraroute extension"
Jenkins [Wed, 15 Jul 2015 00:08:38 +0000 (00:08 +0000)]
Merge "Register extraroute extension"

9 years agoMerge "Updated from global requirements"
Jenkins [Tue, 14 Jul 2015 22:22:27 +0000 (22:22 +0000)]
Merge "Updated from global requirements"

9 years agoMerge "Fix typo of 'receive' in test_dhcp_ipv6.py"
Jenkins [Tue, 14 Jul 2015 21:48:08 +0000 (21:48 +0000)]
Merge "Fix typo of 'receive' in test_dhcp_ipv6.py"

9 years agoFix update_port_postcommit and port not found with DVR
Swaminathan Vasudevan [Mon, 29 Jun 2015 23:19:49 +0000 (16:19 -0700)]
Fix update_port_postcommit and port not found with DVR

Updating DVR Router interface ports was throwing
errors in the l2pop mechanism drivers function
update_port_postcommit.

PortContext's portbinding information does not show
the status of the ports. For DVR Router interface
ports the DVRPortbinding table contains the status
information for the ports.

In the case of the update_port method, there was
no code related to DVR that retreives the port
binding information from the DVRPortBinding table.

This was working before, since in the driver_context,
the PortContext was just returning the port status for
all router interfaces.

With the recent refactor to the driver_context, this
behavior changed and the PortContext was returning the
_binding.status for the DVR router interface ports and
the _port.status for the non DVR ports.

When the update_port function calls update_port_postcommit
with PortContext for DVR router interface ports, l2pop
was throwing an error saying that Portbinding does not
have the attribute 'status'.

This was causing addition of any second subnet to the
same network with respect to IPv6 to fail.
Because in the case of IPv6, when you add additional
subnets to the existing network, it just updates the port
with the IPv6 prefix instead of creating additional port.

In the case of IPv4 still we could see that there are
two different ports created for each subnet we try to
add.

This patch fixes the above issue in l2pop and allows the
DVR router interface ports to be successfull.

Also the _find_ipv6_router_port_by_network was returning
all the ports for DVR including the DVR CSNAT internal
ports which are not part of the router interface ports.

This patch also fixes this problem by returning false,
when it finds a DVR SNAT port.

Closes-Bug: #1465434

Change-Id: Id243a4b3f30071226411ace6d12550fc099901cc

9 years agoTighten exception handler for import_object
Ihar Hrachyshka [Mon, 13 Jul 2015 09:49:42 +0000 (11:49 +0200)]
Tighten exception handler for import_object

oslo_utils raise ImportError if import fails. We should propagate other
failures to callers. Otherwise we may hide issues.

Also report exact failure from import_object in case L3 agent fails to
import interface_driver.

As part of the job, consolidated code to load interface driver into
common function.

Also, stopped checking for specific log messages in dhcp and l3 agent
unit tests: it's too fragile and actually not something we need a unit
test for.

Not to introduce more work for people who handle py3 porting effort,
added the unit test into the list of those that are executed for py34
job until the whole suite is ready for python3.

Change-Id: I10cdb8414c9fb4ad5cfd3f3b2630811f50ffb0c7

9 years agoMerge "Add Pluggable IPAM Backend Part 1"
Jenkins [Tue, 14 Jul 2015 16:20:49 +0000 (16:20 +0000)]
Merge "Add Pluggable IPAM Backend Part 1"

9 years agoMerge "Fix typo 'adress'"
Jenkins [Tue, 14 Jul 2015 16:10:31 +0000 (16:10 +0000)]
Merge "Fix typo 'adress'"

9 years agoUpdated from global requirements
OpenStack Proposal Bot [Tue, 14 Jul 2015 14:50:46 +0000 (14:50 +0000)]
Updated from global requirements

Change-Id: Ibcb49412a012f79be2f7fd697349ddbf43bd7b9b

9 years agobugs: Update info about current bug czar
Kyle Mestery [Tue, 14 Jul 2015 13:28:52 +0000 (13:28 +0000)]
bugs: Update info about current bug czar

Eugene stepped down as bug czar a month or so ago, update it to reflect
the fact I've been triaging bugs since then and will be the contact
point now.

Change-Id: I598ac4ea742e39987e5554184e0df4fc718104ab
Signed-off-by: Kyle Mestery <mestery@mestery.com>
9 years agoMerge "Disable python3 tests failing due to Routes < 2.0"
Jenkins [Tue, 14 Jul 2015 11:46:36 +0000 (11:46 +0000)]
Merge "Disable python3 tests failing due to Routes < 2.0"

9 years ago[neutron-db-manage] support separate migration branches
Ihar Hrachyshka [Mon, 22 Jun 2015 14:23:36 +0000 (16:23 +0200)]
[neutron-db-manage] support separate migration branches

New migration rule scheme is introduced. Now, changes are classified
into the following branches:

- expand (additive changes only)
- contract (contraction changes, including data migration)

Make 'neutron-db-manage revision' generate two separate migration
scripts, one per branch.

Now that we support multiple heads, renamed HEAD file in HEADS. We still
don't allow more branching, so keep validation for the number of
branches.

For backwards compatibility, calling to 'upgrade head' applies both
branches in proper order.

Note that advanced services will be moved to the new migration scheme in
separate patches for respective repos.

This patch does not introduce autogenerate support for multiple branches
for 'revision' command (that depends on a new alembic version yet
unreleased; but alembic/master already has everything to support us).

The patch does not implement 'expand' or 'contract' commands that are
anticipated by the spec proposal. Those will come in consequent patches.

Upgrade impact is backwards compatible: those who are interested in
reducing downtime while applying some migration rules can opt in it by
modifying their upgrade practices, while everything should still work
the old way for those who don't care.

blueprint online-schema-migrations

DocImpact
UpgradeImpact

Change-Id: I3823900bc5aaf7757c37edb804027cf4d9c757ab

9 years agoDisable python3 tests failing due to Routes < 2.0
Akihiro Motoki [Mon, 13 Jul 2015 01:30:47 +0000 (10:30 +0900)]
Disable python3 tests failing due to Routes < 2.0

At now, global-requirements has an entry:
Routes!=2.0,!=2.1,>=1.12.3
and this leads to Routes < 2.0 which is not compatible
with Python 3. This blocks updating of global requirements [1].
To avoid the situation, this commit disables python 3 related
error due to Routes version.

Closes-Bug: #1474266
Related to blueprint neutron-python3

[1] https://review.openstack.org/#/c/182746/

Change-Id: If5e6355505361cbefe04487b6d47ab9cc6ba861c

9 years agoFix typo of 'receive' in test_dhcp_ipv6.py
Takashi NATSUME [Tue, 14 Jul 2015 00:56:13 +0000 (09:56 +0900)]
Fix typo of 'receive' in test_dhcp_ipv6.py

Change-Id: I67e278232d1d100c183128565d843271b463107a

9 years agoFix typo 'adress'
Takashi NATSUME [Tue, 14 Jul 2015 01:16:53 +0000 (10:16 +0900)]
Fix typo 'adress'

Fix typo 'adress_scope' to 'address_scope'
in neutron/extensions/address_scope.py.
Fix typo 'test_remove_adresses_by_interface' to
'test_remove_addresses_by_interface'
in neutron/tests/unit/agent/linux/test_keepalived.py

Change-Id: If5496911b63a9f199c9be389ab3fd938c21d091e

9 years agoCleanup unused method get_plugin_version
Kenji Yasui [Mon, 13 Jul 2015 07:59:03 +0000 (07:59 +0000)]
Cleanup unused method get_plugin_version

This patch removes get_plugin_version because it's left over
from the original plugin api and is not in the current api.

Change-Id: Icc9f4e6074b30edfe46364819f812731ad514b47

9 years agoMerge "Include comment in DHCP ip6tables rules"
Jenkins [Tue, 14 Jul 2015 01:27:05 +0000 (01:27 +0000)]
Merge "Include comment in DHCP ip6tables rules"

9 years agoMerge "Remove self.snat_ports, a dvr thing, from router base class"
Jenkins [Tue, 14 Jul 2015 00:47:10 +0000 (00:47 +0000)]
Merge "Remove self.snat_ports, a dvr thing, from router base class"

9 years agoMerge "DVR: cleanup stale floating ip namespaces"
Jenkins [Mon, 13 Jul 2015 23:47:52 +0000 (23:47 +0000)]
Merge "DVR: cleanup stale floating ip namespaces"

9 years agoMerge "Install more-specific ICMPv6 rule in DVR routers"
Jenkins [Mon, 13 Jul 2015 22:37:50 +0000 (22:37 +0000)]
Merge "Install more-specific ICMPv6 rule in DVR routers"

9 years agoRemove db-access semaphore in ML2
Kevin Benton [Mon, 13 Jul 2015 22:27:54 +0000 (15:27 -0700)]
Remove db-access semaphore in ML2

With the addition of the deadlock retry decorator in
I635cc49ca69f589f99ab145d4d51e511b24194d2 and the change
to instantaneous deadlock feedback under the pymysql driver,
this semaphore should no longer be necessary. Removing it
will allow us to benefit from processing multiple requests
simultaneously.

Change-Id: If5dc76a2974d13d45f0cc88419bcccb3332576cf

9 years agoMerge "Add extra subnet route to ha router"
Jenkins [Mon, 13 Jul 2015 18:49:20 +0000 (18:49 +0000)]
Merge "Add extra subnet route to ha router"

9 years agoRemove self.snat_ports, a dvr thing, from router base class
Carl Baldwin [Thu, 9 Jul 2015 21:26:49 +0000 (21:26 +0000)]
Remove self.snat_ports, a dvr thing, from router base class

This was overlooked in splitting out dvr code from the router base
class.  It is dvr only.  Also, it doesn't need to be an instance
variable and was not use consistently.

Change-Id: I0eff381c1613e3824c8da0f0ccba65dd3e884cbf

9 years agoMerge "Use _is_this_snat_host and remove _get_gw_port_host"
Jenkins [Mon, 13 Jul 2015 17:53:15 +0000 (17:53 +0000)]
Merge "Use _is_this_snat_host and remove _get_gw_port_host"

9 years agoMerge "Move more snat code to dvr class that does snat"
Jenkins [Mon, 13 Jul 2015 17:48:59 +0000 (17:48 +0000)]
Merge "Move more snat code to dvr class that does snat"

9 years agoMerge "Ensure floating IPs only use IPv4 addresses"
Jenkins [Mon, 13 Jul 2015 17:29:48 +0000 (17:29 +0000)]
Merge "Ensure floating IPs only use IPv4 addresses"

9 years agoInclude comment in DHCP ip6tables rules
Dustin Lundquist [Fri, 10 Jul 2015 19:36:44 +0000 (12:36 -0700)]
Include comment in DHCP ip6tables rules

Change-Id: I28531186c45477939618a01f17f6efed43f71c09

9 years agoMerge "Add sub-project lieutenant for networking-plumgrid"
Jenkins [Mon, 13 Jul 2015 15:14:59 +0000 (15:14 +0000)]
Merge "Add sub-project lieutenant for networking-plumgrid"

9 years agoMerge "Enforce specific order for firewall.(un)filtered_ports and devices"
Jenkins [Mon, 13 Jul 2015 09:54:45 +0000 (09:54 +0000)]
Merge "Enforce specific order for firewall.(un)filtered_ports and devices"

9 years agoMerge "get_vif_ports: ignore non-Interface ports"
Jenkins [Mon, 13 Jul 2015 09:14:32 +0000 (09:14 +0000)]
Merge "get_vif_ports: ignore non-Interface ports"

9 years agoMerge "Reject router-interface-add with a port which doesn't have any addresses"
Jenkins [Mon, 13 Jul 2015 08:26:14 +0000 (08:26 +0000)]
Merge "Reject router-interface-add with a port which doesn't have any addresses"

9 years agoEnsure floating IPs only use IPv4 addresses
Dustin Lundquist [Mon, 6 Jul 2015 20:53:46 +0000 (13:53 -0700)]
Ensure floating IPs only use IPv4 addresses

Description:
Presently Neutron doesn't validate the address family of floating IP
addresses or the internal addresses they are associated with. It merely
associates the first IP of the floating IP's port with the first IP of
the internal port, unless a specified fixed IP is specified. This can
lead to incorrect or poorly defined behavior when IPv6 is present.

The existing L3 agent implementation only manages IPv4 NAT rules. While
IPv6 NAT and NAT protocol translation are possible, the existing
implementation does not support these configurations.

Presently a floating IP can be created on an IPv6 only external network
or associated with an IPv6 fixed IP, but the L3 agent is unable to bind
these configurations.

Implementation:
When creating and updating a floating IP, only consider IPv4 addresses
on both the floating IPs port and the internal port he floating IP is
associated with. Additionally disallow creating floating IPs on networks
without any IPv4 subnets, since these floating IPs could not be
allocated an IPv4 address.

DocImpact
APIImpact

Co-Authored-By: Bradley Jones <jones.bradley@me.com>
Change-Id: I79b28a304b38ecdafc17eddc41213df1c24ec202
Related-Bug: #1437855
Closes-Bug: #1323766
Closes-Bug: #1469322

9 years agoMerge "Make IPAM more pythonic"
Jenkins [Sun, 12 Jul 2015 21:05:05 +0000 (21:05 +0000)]
Merge "Make IPAM more pythonic"

9 years agoMerge "Fix duplicate entry catch for allowed address pairs"
Jenkins [Sun, 12 Jul 2015 14:12:13 +0000 (14:12 +0000)]
Merge "Fix duplicate entry catch for allowed address pairs"

9 years agoReject router-interface-add with a port which doesn't have any addresses
YAMAMOTO Takashi [Fri, 19 Jun 2015 07:28:23 +0000 (16:28 +0900)]
Reject router-interface-add with a port which doesn't have any addresses

Fix a regression in commit I7d4e8194815e626f1cfa267f77a3f2475fdfa3d1 .

Closes-Bug: #1466750
Related-Bug: #1439824
Change-Id: Ic0c4c0adbffe14b1f08d4b2dee91e1dff41cc770

9 years agoImported Translations from Transifex
OpenStack Proposal Bot [Sat, 11 Jul 2015 06:09:29 +0000 (06:09 +0000)]
Imported Translations from Transifex

For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure

Change-Id: I33a9e5a28666a295dd24f6c482b9805b33d0ca69

9 years agoEnforce specific order for firewall.(un)filtered_ports and devices
Ihar Hrachyshka [Fri, 10 Jul 2015 12:07:09 +0000 (14:07 +0200)]
Enforce specific order for firewall.(un)filtered_ports and devices

Lots of tests in the file rely on specific order of devices and ports
with which they are iterated thru inside firewall implementation. This
is needed to match a regexp against iptables output generated by the
firewall driver.

In production code, those .(un)filtered_ports dictionaries are
unordered, and it would be not wise to enforce the order for them just
for the sake of those unit tests.

Instead, we 'patch' the agent firewall with ordered versions of dict for
those attributes.

Also enforce specific order for device_info dictionaries we pass into
firewall.

The failure was easily reproducible with PYTHONHASHSEED=111, and after
the fix, it's gone.

While at it, stop making assumptions about stable order of dict.values()
between multiple dictionaries with the same keys. It may actually work
for now, but it seems fragile. Overall simplified regex construction
code a bit, f.e. killing some dead or redundant code.

Closes-Bug: #1473413
Change-Id: I170087426bc961592b4c4923c64a5fea30d51c21

9 years agoMerge "Arista ML2 driver should ignore non-vlan networks"
Jenkins [Fri, 10 Jul 2015 19:41:44 +0000 (19:41 +0000)]
Merge "Arista ML2 driver should ignore non-vlan networks"

9 years agoMerge "Allow IPAM backend switch"
Jenkins [Fri, 10 Jul 2015 18:41:45 +0000 (18:41 +0000)]
Merge "Allow IPAM backend switch"

9 years agoUse _is_this_snat_host and remove _get_gw_port_host
Carl Baldwin [Thu, 9 Jul 2015 21:14:39 +0000 (21:14 +0000)]
Use _is_this_snat_host and remove _get_gw_port_host

The _is_this_snat_host utility should be used consistently.  After
replacing a call to _get_gw_port_host with _is_this_snat_host,
_get_gw_port_host is left as just a simple helper method for
_is_this_snat_host.  The indirection is excessive and so they are
combined.

Change-Id: I880c5fdc9db9ba1304dba74a6e12f3df604793e5

9 years agoMove more snat code to dvr class that does snat
Carl Baldwin [Thu, 9 Jul 2015 21:08:19 +0000 (21:08 +0000)]
Move more snat code to dvr class that does snat

A few methods were left in the wrong class when splitting up the dvr
classes.  This commit reduces the amount of dependency between the
two.

Change-Id: Id1b4f4e99a5c51576eddadd5eb0c973c0d5b46b8

9 years agoMerge "Python 3: Fix a TypeError in policy.py"
Jenkins [Fri, 10 Jul 2015 17:12:17 +0000 (17:12 +0000)]
Merge "Python 3: Fix a TypeError in policy.py"

9 years agoMerge "Move DVR related method to proper class"
Jenkins [Fri, 10 Jul 2015 15:02:42 +0000 (15:02 +0000)]
Merge "Move DVR related method to proper class"

9 years agoget_vif_ports: ignore non-Interface ports
Dan Prince [Thu, 9 Jul 2015 19:31:13 +0000 (15:31 -0400)]
get_vif_ports: ignore non-Interface ports

This patch updates get_vif_ports so that it skips
ports which aren't in the 'Interfaces' table.

This fixes an issue where neutron-ovs-cleanup would
fail if any sort of OVS bond was on the bridge getting
cleaned up.  This is because bonds don't have the same
attributes as ports, and thus fail subsequent ovs-vsctl
queries.

Change-Id: Ic9d30e5916122ce23c5dc8631fbb71115ae8a960
Closes-bug: #1473179

9 years agoAdd Pluggable IPAM Backend Part 1
Pavel Bondar [Mon, 6 Jul 2015 15:36:22 +0000 (18:36 +0300)]
Add Pluggable IPAM Backend Part 1

Add methods for allocating/deallocating ips using IPAM driver.
Methods are covered by unit tests and currently used only by them.

For pluggable IPAM case ipam driver may execute calls to third-party servers.
It means we can't rely on database transaction rollback in case of failure.
So if any bulk ip allocation/deallocation fails rollback should be done
on third-party servers as well.
Any completed ip allocation should be explicitly deallocated in case of
failure, and vise versa for failure on deallocation.
Try-except block is used to do manual rollback actions.
After rollback actions are done, exception is reraised and local db
transaction rollback occurs.

Pluggable IPAM was divided into two parts to keep review size small.
Following patches are expected to use these methods for ip address
allocation.

Partially-Implements: blueprint neutron-ipam

Change-Id: I8bb836c9883e189b065698ae0a862b2d909d5cbf

9 years agoFix duplicate entry catch for allowed address pairs
Wei Wang [Thu, 25 Sep 2014 09:49:59 +0000 (17:49 +0800)]
Fix duplicate entry catch for allowed address pairs

If None is submitted as a MAC address in an allowed_address_pair,
the port MAC will be used. So if two entries are submitted with the
same IP and one's MAC is None while the others is the port's MAC,
they will pass the API duplication check and fail to insert into the DB
due to a unique constraint violation.

This patch catches the db error and turns it into the same exception
the API uses on duplicate entries.

Closes-bug: #1373756
Change-Id: Ide995810d6fe0481d3add206bf0674cbbde7f05f

9 years agoMerge "Move update_security_group_on_port to SecurityGroupDbMixin"
Jenkins [Fri, 10 Jul 2015 02:37:20 +0000 (02:37 +0000)]
Merge "Move update_security_group_on_port to SecurityGroupDbMixin"

9 years agoFix failures introduced by the new version of mock
Kevin Benton [Thu, 9 Jul 2015 23:54:23 +0000 (16:54 -0700)]
Fix failures introduced by the new version of mock

This reverts commit 1b60df85ba3ad442c2e4e7e52538e1b9a1bf9378.

The new version of mock is now released which has the fix to
make mock.patch.stopall behave deterministically. The code to
stop double-mocking is no longer required.

Other fixes:

'assert_has_calls' that have changed behavior in the new version
(no longer accepts single calls).

Calls to non-existent assert methods that did not exist and were
silently passing.

Use of autospec on a class with decorated functions.

Closes-Bug: #1473369
Change-Id: I164a9af2a7f9ac0f0229ec3c5071f7a470445c98

9 years agoArista ML2 driver should ignore non-vlan networks
Sukhdev Kapur [Wed, 8 Jul 2015 02:39:15 +0000 (19:39 -0700)]
Arista ML2 driver should ignore non-vlan networks

Arista ML2 Mech driver for VLANs presently does
not filter out non-vlan type networks (e.g vxlan).
This fix will simply ignore the request if a
non-vlan based network request is seen.

Change-Id: I99ec5c5772a9f1f63cf871a98be50bdd2ba5db62
Closes-Bug: 1472458

9 years agoMerge "In Arista ML2 driver Reconfigure VLAN on VM migration"
Jenkins [Thu, 9 Jul 2015 19:38:43 +0000 (19:38 +0000)]
Merge "In Arista ML2 driver Reconfigure VLAN on VM migration"

9 years agoMake IPAM more pythonic
Sean M. Collins [Fri, 26 Jun 2015 17:14:41 +0000 (11:14 -0600)]
Make IPAM more pythonic

__init__.py is usually an empty file, or contains platform specific
code to make the package function. One more use is to have __init__.py
contain import statements, to import functions and classes, for convenience.

http://docs.python-guide.org/en/latest/writing/structure/#packages
http://mikegrouchy.com/blog/2012/05/be-pythonic-__init__py.html

Change-Id: I7408ac95f4970fbd7009257dfb698102ffabb6e3

9 years agoMove DVR related method to proper class
Oleg Bondarev [Tue, 7 Jul 2015 10:39:21 +0000 (13:39 +0300)]
Move DVR related method to proper class

get_snat_candidates() is about DVR routers scheduling and hence
should be a method of L3_DVRsch_db_mixin.
This commit does not modify anything, just moves.

Change-Id: Ib610e589befae55c6fe827f5ee8c3d6a596b86e1

9 years agoMerge "Do not mock arping in L3AgentTestFramework functional tests"
Jenkins [Thu, 9 Jul 2015 16:13:33 +0000 (16:13 +0000)]
Merge "Do not mock arping in L3AgentTestFramework functional tests"

9 years agoMerge "Precision networking-bagpipe-l2 subproject"
Jenkins [Thu, 9 Jul 2015 16:13:21 +0000 (16:13 +0000)]
Merge "Precision networking-bagpipe-l2 subproject"

9 years agoAllow IPAM backend switch
Pavel Bondar [Wed, 4 Feb 2015 13:13:28 +0000 (16:13 +0300)]
Allow IPAM backend switch

Changed inheritance chain for NeutronDbPluginV2 to allow switching from
non-pluggable to pluggable IPAM implementation.
IpamNonPluggableBackend methods are called on it's instance,
instead of previous way where IpamNonPluggableBackend was parent for
NeutronDbPluginV2.
It allows switching IPAM implementation in set_ipam_backend
(IpamNonPluggableBackend to IpamPluggableBackend).
All methods that became public in IpamNonPluggableBackend were renamed.

This is refactoring step before Pluggable IPAM can be applied.

Partially-Implements: blueprint neutron-ipam

Change-Id: I81806a43ecc6f0a7b293ce3e70d09d1e266b9f02

9 years agoMove update_security_group_on_port to SecurityGroupDbMixin
Aaron Rosen [Tue, 7 Jul 2015 18:58:06 +0000 (11:58 -0700)]
Move update_security_group_on_port to SecurityGroupDbMixin

Previously this function lived in SecurityGroupServerRpcMixin. This
patch moves this function to SecurityGroupDbMixin so plugins who don't
use SecurityGroupServerRpcMixin can leverage this function. This patch
has no affect to anyone using SecurityGroupServerRpcMixin as that inherits
from SecurityGroupDbMixin.

Change-Id: I6ce60dad222e1e244f0d4fac9680e73de2a9b2e9

9 years agoPython 3: Fix a TypeError in policy.py
YAMAMOTO Takashi [Thu, 9 Jul 2015 07:26:10 +0000 (16:26 +0900)]
Python 3: Fix a TypeError in policy.py

Fix "TypeError: 'filter' object is not subscriptable" with python 3.

Blueprint: neutron-python3
Change-Id: Ia49ce2e283ecf4da5333b95006746cb19490fde4

9 years agoMerge "lb-agent: handle security group updates in main loop"
Jenkins [Wed, 8 Jul 2015 22:30:20 +0000 (22:30 +0000)]
Merge "lb-agent: handle security group updates in main loop"

9 years agoMerge "Add ARP spoofing protection for LinuxBridge agent"
Jenkins [Wed, 8 Jul 2015 20:40:08 +0000 (20:40 +0000)]
Merge "Add ARP spoofing protection for LinuxBridge agent"

9 years agoIn Arista ML2 driver Reconfigure VLAN on VM migration
Shashank Hegde [Fri, 3 Jul 2015 01:16:56 +0000 (18:16 -0700)]
In Arista ML2 driver Reconfigure VLAN on VM migration

Whenever a VM moves from one compute node to the other, the VLAN on the old
switch interface was not removed and the VLAN was not being provisioned on the
new switch interface. With this patch, the VLANs are provisioned correctly.

Closes-Bug: #1471050
Change-Id: I658ef87ffd82119f41beda9ba019e29a62dc96ff

9 years agoMerge "Fix issues with allocation pool generation for ::/64 cidr"
Jenkins [Wed, 8 Jul 2015 16:30:51 +0000 (16:30 +0000)]
Merge "Fix issues with allocation pool generation for ::/64 cidr"

9 years agoMerge "Python3: cast the result of zip() to list"
Jenkins [Wed, 8 Jul 2015 13:45:37 +0000 (13:45 +0000)]
Merge "Python3: cast the result of zip() to list"

9 years agoAdd sub-project lieutenant for networking-plumgrid
Fawad Khaliq [Wed, 8 Jul 2015 10:02:12 +0000 (03:02 -0700)]
Add sub-project lieutenant for networking-plumgrid

Since networking-plumgrid has been approved [1] in
governance to be part of Neutron. So as per the
concept of Lieutenants for Neutron, this patch defines
clear point of contact for networking-plumgrid.

[1] https://review.openstack.org/#/c/197168/

Change-Id: I01706b69aac5ac3970913320ff717dc561ea4f8f

9 years agoFix issues with allocation pool generation for ::/64 cidr
John Davidge [Tue, 7 Jul 2015 16:00:01 +0000 (17:00 +0100)]
Fix issues with allocation pool generation for ::/64 cidr

Passing a ::/64 cidr to certain netaddr functions without specifying
the ip_version causes errors. Fix this by specifying ip_version.

Change-Id: I31aaf9f5dabe4dd0845507f245387cd4186c410c
Closes-Bug: 1472304

9 years agoAdd extra subnet route to ha router
gong yong sheng [Thu, 25 Jun 2015 04:38:40 +0000 (12:38 +0800)]
Add extra subnet route to ha router

Add scope in HA virtual route mode to
represent on link scope route from extra subnet.

Co-Authored-By: Assaf Muller <amuller@redhat.com>
Change-Id: I6ce000a7aa8e4b9e61a35a86d3dc8c0b7beaa3a9
Closes-bug: 1414640

9 years agoMerge "Add IP_ANY dict to ease choosing between IPv4 and IPv6 "any" address"
Jenkins [Wed, 8 Jul 2015 04:15:50 +0000 (04:15 +0000)]
Merge "Add IP_ANY dict to ease choosing between IPv4 and IPv6 "any" address"

9 years agoMerge "Make sure path_prefix is set during unit tests"
Jenkins [Wed, 8 Jul 2015 02:46:23 +0000 (02:46 +0000)]
Merge "Make sure path_prefix is set during unit tests"

9 years agoMerge "Remove lingering traces of q_"
Jenkins [Wed, 8 Jul 2015 02:07:33 +0000 (02:07 +0000)]
Merge "Remove lingering traces of q_"

9 years agoMerge "Track allocation_pools in SubnetRequest"
Jenkins [Wed, 8 Jul 2015 00:53:14 +0000 (00:53 +0000)]
Merge "Track allocation_pools in SubnetRequest"

9 years agoMerge "Refactor init_l3 to separate router port use case"
Jenkins [Wed, 8 Jul 2015 00:52:59 +0000 (00:52 +0000)]
Merge "Refactor init_l3 to separate router port use case"

9 years agoRemove lingering traces of q_
Brian Haley [Tue, 7 Jul 2015 21:03:04 +0000 (17:03 -0400)]
Remove lingering traces of q_

The rename from Quantum to Neutron left a few q_ strings
around, let's go ahead and clean them up.

Change-Id: I06e6bdbd0c2f3a25bb90b5fa291009b9ec2d471d

9 years agoMake sure path_prefix is set during unit tests
armando-migliaccio [Tue, 7 Jul 2015 18:13:41 +0000 (11:13 -0700)]
Make sure path_prefix is set during unit tests

Change 18bc67d5 broke *-aas unit tests.

This change ensures that mocking is done correctly, the same way
it is done for the other plugin attributes

Change-Id: I4167f18560e3a3aad652aae1ea9d3c6bc34dc796
Closes-bug: #1472361

9 years agoAdd IP_ANY dict to ease choosing between IPv4 and IPv6 "any" address
Carl Baldwin [Tue, 7 Jul 2015 16:41:03 +0000 (16:41 +0000)]
Add IP_ANY dict to ease choosing between IPv4 and IPv6 "any" address

I'm working on a new patch that will add one more case where we need
to choose between 0.0.0.0/0 and ::/0 based on the ip version.  I
thought I'd add a new constant and simplify a couple of existing uses.

Change-Id: I376d60c7de4bafcaf2387685ddcc1d98978ce446

9 years agoPython3: cast the result of zip() to list
Cyril Roelandt [Tue, 7 Jul 2015 14:25:06 +0000 (14:25 +0000)]
Python3: cast the result of zip() to list

The result of get_sorts was a 'zip object' in Python 3, and it was later used
as a list, which fails. Just cast the result to a list to fix this issue.

Change-Id: I12017f79cad92b1da4fe5f9939b38436db7219eb
Blueprint: neutron-python3

9 years agoMerge "portsecurity_db_common: Access db columns in a consistent way"
Jenkins [Tue, 7 Jul 2015 14:17:39 +0000 (14:17 +0000)]
Merge "portsecurity_db_common: Access db columns in a consistent way"