]> review.fuel-infra Code Review - openstack-build/neutron-build.git/log
openstack-build/neutron-build.git
9 years agoMerge "Fix FloatingIP Namespace creation in DVR for Late Binding"
Jenkins [Fri, 26 Jun 2015 17:33:09 +0000 (17:33 +0000)]
Merge "Fix FloatingIP Namespace creation in DVR for Late Binding"

9 years agoMerge "Python3: do not use __builtin__"
Jenkins [Fri, 26 Jun 2015 17:29:10 +0000 (17:29 +0000)]
Merge "Python3: do not use __builtin__"

9 years agoRestructure agent code in preparation for decomp
Kyle Mestery [Wed, 24 Jun 2015 19:12:06 +0000 (19:12 +0000)]
Restructure agent code in preparation for decomp

This commit moves the L2 agents (Linuxbridge and OVS) into the
ML2 directory, while at the same time also moving the ML2 server
bits into toplevel directories. It also moves the configuration
files and unit tests. We also move the l2pop RPC mixin while
here as well.

DocImpact
UpgradeImpact

Partially-Implements: blueprint reference-implementation-split
Partial-Bug: #1468433
Closes-Bug: #1427317
Change-Id: If6feca7b7a6bdd6c3c6feb929fa26fb4b1f72770
Signed-off-by: Kyle Mestery <mestery@mestery.com>
9 years agoMerge "linuxbridge: clean up README file"
Jenkins [Fri, 26 Jun 2015 14:45:53 +0000 (14:45 +0000)]
Merge "linuxbridge: clean up README file"

9 years agoMerge "Remove quantum untracked files from .gitignore"
Jenkins [Fri, 26 Jun 2015 08:24:56 +0000 (08:24 +0000)]
Merge "Remove quantum untracked files from .gitignore"

9 years agoMerge "Remove duplicated call to setup_coreplugin"
Jenkins [Fri, 26 Jun 2015 08:16:09 +0000 (08:16 +0000)]
Merge "Remove duplicated call to setup_coreplugin"

9 years agoMerge "Remove double mock of dhcp agent periodic check"
Jenkins [Fri, 26 Jun 2015 08:13:55 +0000 (08:13 +0000)]
Merge "Remove double mock of dhcp agent periodic check"

9 years agoMerge "Remove double fanout mock"
Jenkins [Fri, 26 Jun 2015 08:13:35 +0000 (08:13 +0000)]
Merge "Remove double fanout mock"

9 years agoMerge "Remove double callback manager mocks"
Jenkins [Fri, 26 Jun 2015 08:12:34 +0000 (08:12 +0000)]
Merge "Remove double callback manager mocks"

9 years agoMerge "Skip ARP protection if 0.0.0.0/0 in addr pairs"
Jenkins [Fri, 26 Jun 2015 07:45:21 +0000 (07:45 +0000)]
Merge "Skip ARP protection if 0.0.0.0/0 in addr pairs"

9 years agoMerge "Don't process network_delete events on OVS agent"
Jenkins [Fri, 26 Jun 2015 06:59:38 +0000 (06:59 +0000)]
Merge "Don't process network_delete events on OVS agent"

9 years agoMerge "Remove ensure_dirs double-patch"
Jenkins [Fri, 26 Jun 2015 05:51:59 +0000 (05:51 +0000)]
Merge "Remove ensure_dirs double-patch"

9 years agoMerge "Updated from global requirements"
Jenkins [Fri, 26 Jun 2015 05:47:00 +0000 (05:47 +0000)]
Merge "Updated from global requirements"

9 years agoMerge "Fix tenant-id in Arista ML2 driver to support HA router"
Jenkins [Fri, 26 Jun 2015 05:34:35 +0000 (05:34 +0000)]
Merge "Fix tenant-id in Arista ML2 driver to support HA router"

9 years agoMerge "Python 3: do not use itertools.izip"
Jenkins [Fri, 26 Jun 2015 05:14:16 +0000 (05:14 +0000)]
Merge "Python 3: do not use itertools.izip"

9 years agoMerge "Avoid env variable duplication in tox.ini"
Jenkins [Fri, 26 Jun 2015 03:08:38 +0000 (03:08 +0000)]
Merge "Avoid env variable duplication in tox.ini"

9 years agoMerge "Log OVS agent configuration mismatch"
Jenkins [Fri, 26 Jun 2015 02:29:34 +0000 (02:29 +0000)]
Merge "Log OVS agent configuration mismatch"

9 years agoMerge "Add deadlock retry to API and ML2 RPC port update"
Jenkins [Fri, 26 Jun 2015 01:40:17 +0000 (01:40 +0000)]
Merge "Add deadlock retry to API and ML2 RPC port update"

9 years agoRemove duplicated call to setup_coreplugin
Kevin Benton [Fri, 26 Jun 2015 01:31:38 +0000 (18:31 -0700)]
Remove duplicated call to setup_coreplugin

The test case for vlan_transparent was calling setup_coreplugin
before calling the super setUp method which already calls
setup_coreplugin. This was causing duplicate core plugin fixtures
which resulted in patching the dhcp periodic check twice.

Change-Id: Ide4efad42748e799d8e9c815480c8ffa94b27b38
Partial-Bug: #1468998

9 years agoRemove double mock of dhcp agent periodic check
Kevin Benton [Fri, 26 Jun 2015 01:29:37 +0000 (18:29 -0700)]
Remove double mock of dhcp agent periodic check

The test case for the periodic check was patching a target
that the core plugin fixture already patched out. This removes
that and exposes the mock from the fixture so the test case
can reference it.

Change-Id: I3adee6a875c497e070db4198567b52aa16b81ce8
Partial-Bug: #1468998

9 years agoRemove double fanout mock
Kevin Benton [Fri, 26 Jun 2015 01:24:10 +0000 (18:24 -0700)]
Remove double fanout mock

The test_mech_driver was duplicating a fanout mock already setup
in the setUp routine.

Change-Id: I5b88dff13113d55c72241d3d5025791a76672ac2
Partial-Bug: #1468998

9 years agoRemove double callback manager mocks
Kevin Benton [Fri, 26 Jun 2015 00:55:16 +0000 (17:55 -0700)]
Remove double callback manager mocks

setup_test_registry_instance() in the base test case class gives
each test its own registry by mocking out the get_callback_manager.
The L3 agent test cases were duplicating this.

Partial-Bug: #1468998
Change-Id: I7356daa846524611e9f92365939e8ad15d1e1cd8

9 years agoMerge "Removed test_lib module"
Jenkins [Fri, 26 Jun 2015 01:06:38 +0000 (01:06 +0000)]
Merge "Removed test_lib module"

9 years agoRemove ensure_dirs double-patch
Kevin Benton [Thu, 25 Jun 2015 23:57:30 +0000 (16:57 -0700)]
Remove ensure_dirs double-patch

test_spawn_radvd called mock.patch on ensure_dirs after the
setup method already patched it out. This causes issues when
mock.patch.stopall() is called because the mocks are stored
as a set and are unwound in a non-deterministic fashion.[1]
So some of the time they will be undone correctly, but others
will leave a monkey-patched in mock, causing the ensure_dir
test to fail.

1. http://bugs.python.org/issue21239

Closes-Bug: #1467908
Change-Id: I321b5fed71dc73bd19b5099311c6f43640726cd4

9 years agoFix tenant-id in Arista ML2 driver to support HA router
Sukhdev Kapur [Thu, 25 Jun 2015 22:11:28 +0000 (15:11 -0700)]
Fix tenant-id in Arista ML2 driver to support HA router

When HA router is created, the framework creates a network and does
not specify the tenant-id. This casuse Arista ML2 driver to fail.
This patch sets the tenant-id when it is not passed explicitly by
by the network_create() call from the HA router framework.

Even though original issue was discovered for network_create()
it turns out the same issue applies for port_create() as well
so all the methods are fixed in this patch

Change-Id: Id03e26dac003fa589477ed78a4ed3c44cc2f708d
Closes-Bug: 1468828

9 years agoMerge "Switch to oslo_utils.uuidutils"
Jenkins [Thu, 25 Jun 2015 22:53:39 +0000 (22:53 +0000)]
Merge "Switch to oslo_utils.uuidutils"

9 years agoMerge "Fix tox errors in thirdparty-ci docs"
Jenkins [Thu, 25 Jun 2015 20:34:17 +0000 (20:34 +0000)]
Merge "Fix tox errors in thirdparty-ci docs"

9 years agoLog OVS agent configuration mismatch
Assaf Muller [Thu, 25 Jun 2015 20:34:09 +0000 (16:34 -0400)]
Log OVS agent configuration mismatch

Change-Id: I55aef3bdc32dcee3436cb8b987fb796a4898b20e
Closes-Bug: #1468893

9 years agoAvoid env variable duplication in tox.ini
Cedric Brandily [Wed, 24 Jun 2015 19:31:33 +0000 (21:31 +0200)]
Avoid env variable duplication in tox.ini

Some environment variables are defined multiple times in tox.ini. This
change defines "fake" tox jobs and refactors existing jobs to reduce
duplicated environment variables.

Change-Id: I0ccebea4fbfff8dda34d1ed348b96b3b8ebd59e2

9 years agoMerge "ovsdb: attempt to enable connection_uri for native impl on startup"
Jenkins [Thu, 25 Jun 2015 17:39:33 +0000 (17:39 +0000)]
Merge "ovsdb: attempt to enable connection_uri for native impl on startup"

9 years agoMerge "Only create one netaddr.IPNetwork object"
Jenkins [Thu, 25 Jun 2015 17:39:10 +0000 (17:39 +0000)]
Merge "Only create one netaddr.IPNetwork object"

9 years agoMerge "Context class should initialise its own data"
Jenkins [Thu, 25 Jun 2015 17:27:05 +0000 (17:27 +0000)]
Merge "Context class should initialise its own data"

9 years agoMerge "Fix >80 char lines that pep8 failed to detect"
Jenkins [Thu, 25 Jun 2015 17:21:45 +0000 (17:21 +0000)]
Merge "Fix >80 char lines that pep8 failed to detect"

9 years agoSkip ARP protection if 0.0.0.0/0 in addr pairs
Kevin Benton [Wed, 3 Jun 2015 22:20:27 +0000 (15:20 -0700)]
Skip ARP protection if 0.0.0.0/0 in addr pairs

Don't setup ARP protection on ports with allowed address pairs
that allow them to use any IP address. This is necessary because
OVS doesn't support the /0 prefix in rules that match on ARP headers.

Related-Bug: #1461054
Closes-Bug: #1468009
Change-Id: I913a86f22b228aa11fa3dabd9493c3995198f7ec

9 years agolinuxbridge: clean up README file
Ihar Hrachyshka [Thu, 25 Jun 2015 13:54:34 +0000 (15:54 +0200)]
linuxbridge: clean up README file

It's weird that we suggest users to copy python files around instead of
relying on generated console_scripts.

Other configuration information located here is trivial and is
documented elsewhere, f.e. [1].

[1]: http://docs.openstack.org/networking-guide/deploy_scenario1b.html

Change-Id: Ie8dd37087599ff4b5e23f0ad01105f94f5b886ab

9 years agoFix tox errors in thirdparty-ci docs
John Davidge [Thu, 25 Jun 2015 14:12:59 +0000 (15:12 +0100)]
Fix tox errors in thirdparty-ci docs

Fixes errors causing tox failures.

Change-Id: I361ef791c0de1aac1304bb8ad979066400930434
Closes-Bug: #1468765

9 years agoRemoved test_lib module
Ihar Hrachyshka [Thu, 25 Jun 2015 13:41:02 +0000 (15:41 +0200)]
Removed test_lib module

It's not really needed. It was once used to allow some out-of-tox plugin
specific testing scripts to inject configuration files into
BaseTestCase.

Now, our testing story does not have any notion of out-of-gate plugin
specific testing, so let's just clean it up.

Change-Id: If287a38e80016b1dba049a2b745bad7af40583a8

9 years agoUpdated from global requirements
Russell Bryant [Wed, 24 Jun 2015 18:59:26 +0000 (14:59 -0400)]
Updated from global requirements

This patch takes the latest global requirements update from change
Ibcb49412a012f79be2f7fd697349ddbf43bd7b9b except takes out the update
to setup.py which reverts the windows specific requirements.  We are
still working on getting the custom changes out of setup.py in change
I3c07c279d33f6aed46c3a97dd9ba81251e51429a.

Change-Id: Iee7612d39b520cf04e3b2ec503ec79d23f15f949

9 years agoRemove quantum untracked files from .gitignore
Cedric Brandily [Thu, 25 Jun 2015 11:59:37 +0000 (11:59 +0000)]
Remove quantum untracked files from .gitignore

This change removes obsolete quantum untracked files from .gitignore.

Change-Id: I1ddf0b03d29066363f155dd5af8294efde5b0ef0

9 years agoMerge "Make DHCPv6 out of bounds API test deterministic"
Jenkins [Thu, 25 Jun 2015 09:46:02 +0000 (09:46 +0000)]
Merge "Make DHCPv6 out of bounds API test deterministic"

9 years agoContext class should initialise its own data
Matthew Booth [Thu, 25 Jun 2015 09:20:08 +0000 (10:20 +0100)]
Context class should initialise its own data

This is a trivial cleanup. A superclass was initialising data which
was only used in a subclass.

Change-Id: I6930fdaef3dcb960f6baaedbd191e22b565f319e

9 years agoovsdb: attempt to enable connection_uri for native impl on startup
Ihar Hrachyshka [Tue, 23 Jun 2015 15:33:38 +0000 (17:33 +0200)]
ovsdb: attempt to enable connection_uri for native impl on startup

The port is in most cases disabled, so to use it, we should first enable
it, and it means that we should still rely on ovs-vsctl for that initial
call.

Closes-Bug: #1468259
Change-Id: I097b1c441df1f7f1785b8744f27809617bb21c14

9 years agoMerge "Move third-party CI policy under docs/policies"
Jenkins [Thu, 25 Jun 2015 04:40:41 +0000 (04:40 +0000)]
Merge "Move third-party CI policy under docs/policies"

9 years agoMerge "Provide work around for 0.0.0.0/0 ::/0 for ipset"
Jenkins [Thu, 25 Jun 2015 00:13:32 +0000 (00:13 +0000)]
Merge "Provide work around for 0.0.0.0/0 ::/0 for ipset"

9 years agoMerge "Remove lbaas API tests, which are now in the lbaas repo"
Jenkins [Wed, 24 Jun 2015 22:44:52 +0000 (22:44 +0000)]
Merge "Remove lbaas API tests, which are now in the lbaas repo"

9 years agoMerge "Deprecate "router_delete_namespaces" and "dhcp_delete_namespaces""
Jenkins [Wed, 24 Jun 2015 22:28:42 +0000 (22:28 +0000)]
Merge "Deprecate "router_delete_namespaces" and "dhcp_delete_namespaces""

9 years agoMove third-party CI policy under docs/policies
Doug Wiegley [Tue, 2 Jun 2015 02:58:41 +0000 (20:58 -0600)]
Move third-party CI policy under docs/policies

Change-Id: Ib2ed587670f206283d735191b3a2580bf3d1a04f

9 years agoRemove lbaas API tests, which are now in the lbaas repo
Doug Wiegley [Tue, 2 Jun 2015 02:31:01 +0000 (20:31 -0600)]
Remove lbaas API tests, which are now in the lbaas repo

Change-Id: I2009ca3f102d0ca0db3f12af3012989f2a036c48

9 years agoMerge "Use string exception casting everywhere"
Jenkins [Wed, 24 Jun 2015 19:54:18 +0000 (19:54 +0000)]
Merge "Use string exception casting everywhere"

9 years agoMerge "Override opportunistic database tests to PyMySQL"
Jenkins [Wed, 24 Jun 2015 19:39:06 +0000 (19:39 +0000)]
Merge "Override opportunistic database tests to PyMySQL"

9 years agoMerge "Extend default setenv instead of replacing it in tox.ini"
Jenkins [Wed, 24 Jun 2015 19:34:57 +0000 (19:34 +0000)]
Merge "Extend default setenv instead of replacing it in tox.ini"

9 years agoMerge "Bulk move methods to ipam_backend_mixin.py"
Jenkins [Wed, 24 Jun 2015 19:34:43 +0000 (19:34 +0000)]
Merge "Bulk move methods to ipam_backend_mixin.py"

9 years agoMerge "Fix SR-IOV mech driver to set port status to down when agent is required"
Jenkins [Wed, 24 Jun 2015 19:34:27 +0000 (19:34 +0000)]
Merge "Fix SR-IOV mech driver to set port status to down when agent is required"

9 years agoMerge "Add IPset cleanup script"
Jenkins [Wed, 24 Jun 2015 19:31:22 +0000 (19:31 +0000)]
Merge "Add IPset cleanup script"

9 years agoOnly create one netaddr.IPNetwork object
Aaron Rosen [Wed, 24 Jun 2015 17:28:18 +0000 (10:28 -0700)]
Only create one netaddr.IPNetwork object

Change-Id: I8c6a08e0cf3b5b5386fe03af9f2174c663b8ac73

9 years agoProvide work around for 0.0.0.0/0 ::/0 for ipset
Aaron Rosen [Wed, 3 Jun 2015 23:19:39 +0000 (16:19 -0700)]
Provide work around for 0.0.0.0/0 ::/0 for ipset

Previously, the ipset_manager would pass in 0.0.0.0/0 or ::/0 if
these addresses were inputted as allowed address pairs. This causes
ipset to raise an error as it does not work with zero prefix sizes.
To solve this problem we use two ipset rules to represent this:

Ipv4: 0.0.0.0/1 and 128.0.0.1/1
IPv6: ::/1' and '8000::/1

All of this logic is handled via _sanitize_addresses() in the ipset_manager
which is called to convert the input.

Change-Id: I8c6a08e0cf3b5b5386fe03af9f2174c666b8ac75
Closes-bug: 1461054

9 years agoMerge "Revert "Fix subnet creation failure on IPv6 valid gateway""
Jenkins [Wed, 24 Jun 2015 16:59:58 +0000 (16:59 +0000)]
Merge "Revert "Fix subnet creation failure on IPv6 valid gateway""

9 years agoFix >80 char lines that pep8 failed to detect
Kevin Benton [Wed, 24 Jun 2015 16:19:18 +0000 (09:19 -0700)]
Fix >80 char lines that pep8 failed to detect

Change-Id: I602e0d484c5e00eb48b86c4c8c4eff0be195c3a5

9 years agoMerge "Remove get_namespace from API extensions"
Jenkins [Wed, 24 Jun 2015 14:54:12 +0000 (14:54 +0000)]
Merge "Remove get_namespace from API extensions"

9 years agoDeprecate "router_delete_namespaces" and "dhcp_delete_namespaces"
Anthony Chow [Wed, 24 Jun 2015 05:05:23 +0000 (22:05 -0700)]
Deprecate "router_delete_namespaces" and "dhcp_delete_namespaces"

These 2 configuration options are no longer be necessary.

They are marked as deprecated in this release and will be removed in the
next release.

Change-Id: I4e02a291738b16c7c9b7600f0bc9a47fb1318569
Partial-Bug: #1418079

9 years agoMerge "Remove duplicate tunnel id check in sync_allocations"
Jenkins [Wed, 24 Jun 2015 11:40:11 +0000 (11:40 +0000)]
Merge "Remove duplicate tunnel id check in sync_allocations"

9 years agoMerge "Cleanup get_plugin_name() from the tree"
Jenkins [Wed, 24 Jun 2015 10:36:46 +0000 (10:36 +0000)]
Merge "Cleanup get_plugin_name() from the tree"

9 years agoMake DHCPv6 out of bounds API test deterministic
Kevin Benton [Wed, 24 Jun 2015 10:27:16 +0000 (03:27 -0700)]
Make DHCPv6 out of bounds API test deterministic

The test_dhcp_stateful_fixedips_outrange API test was randomly
picking an IP from last + 1 up to last + 10 in the allocation
range. This made it fail randomly when there was an issue related
to the subnet allocation having an off-by-one issue.

This adjusts the test to just always test last +1 and +2.

Related-Bug: #1468163
Change-Id: I641ab092e0ea0aae67ec717b492118a2f8a6f4fd

9 years agoMerge "Optimize ipset usage in IptablesFirewallDriver"
Jenkins [Wed, 24 Jun 2015 10:00:17 +0000 (10:00 +0000)]
Merge "Optimize ipset usage in IptablesFirewallDriver"

9 years agoMerge "Fix callback registry notification for security group rule"
Jenkins [Wed, 24 Jun 2015 09:51:20 +0000 (09:51 +0000)]
Merge "Fix callback registry notification for security group rule"

9 years agoDon't process network_delete events on OVS agent
Kevin Benton [Wed, 24 Jun 2015 09:15:29 +0000 (02:15 -0700)]
Don't process network_delete events on OVS agent

There is no reason to reclaim the local VLAN on a network_delete
event since it will be reclaimed when the last port is deleted anyway.

This method was racey with recent port creation events and lead to
occasional traces when it would yank the local VLAN out from underneath
an ongoing port wiring process.

Change-Id: I5eee6175c053006b35b6efe274d27931a9d5d89f
Closes-Bug: #1468251

9 years agoMerge "Don't delete DVR namespace if there are still ports on this node"
Jenkins [Wed, 24 Jun 2015 06:37:01 +0000 (06:37 +0000)]
Merge "Don't delete DVR namespace if there are still ports on this node"

9 years agoMerge "Ease debugging alembic by passing proper scripts path in alembic.ini"
Jenkins [Wed, 24 Jun 2015 05:19:23 +0000 (05:19 +0000)]
Merge "Ease debugging alembic by passing proper scripts path in alembic.ini"

9 years agoRevert "Fix subnet creation failure on IPv6 valid gateway"
Henry Gessau [Wed, 24 Jun 2015 03:16:52 +0000 (03:16 +0000)]
Revert "Fix subnet creation failure on IPv6 valid gateway"

Because it breaks tests.api.test_dhcp_ipv6.NetworksTestDHCPv6.test_dhcp_stateful_fixedips_outrange

This reverts commit ee51ef72d37a02005a7733b7f2faf7236db850a1.

Change-Id: Id02d9034ca809f194ff7551167bfda3559fb1200

9 years agoSupport oslo_db 1.12
Cedric Brandily [Tue, 23 Jun 2015 22:08:22 +0000 (00:08 +0200)]
Support oslo_db 1.12

oslo_db 1.12[1] decorates oslo_context.context.RequestContext with
session management[2][3] and add a read-only attribute 'session'. Such
feature breaks Brocade plugin and its unittests because they define
on RequestContext the 'session' attribute which now is a read-only
property. This change uses neutron.context instead of
oslo_context.context in order to delegate session management to the
neutron.context and remove read-only attribute set.

A follow-up change will refactor neutron.context in order to use oslo_db
1.12 session management instead of homemade one.

[1] https://github.com/openstack/oslo.db/releases/tag/1.12.0
[2] https://github.com/openstack/oslo.db/commit/\
    fdbd928b1fdf0334e1740e565ab8206fff54eaa6
[3] https://github.com/openstack/oslo.db/blob/\
    fdbd928b1fdf0334e1740e565ab8206fff54eaa6/oslo_db/sqlalchemy/\
    enginefacade.py#L782

Closes-Bug: #1468128
Change-Id: I0e3331f9a383fa2562706eeadb229f55593b888c

9 years agoPython 3: do not use itertools.izip
Cyril Roelandt [Tue, 23 Jun 2015 15:28:34 +0000 (15:28 +0000)]
Python 3: do not use itertools.izip

This no longer exists in Python 3. Use the zip function instead.

Blueprint: neutron-python3
Change-Id: Id7d33ec3d27a27f17040d28bead10f2eb3b831bb

9 years agoOverride opportunistic database tests to PyMySQL
Jeremy Stanley [Thu, 18 Jun 2015 19:09:05 +0000 (19:09 +0000)]
Override opportunistic database tests to PyMySQL

Set the OS_TEST_DBAPI_ADMIN_CONNECTION override variable so that
oslo.db opportunistic detection will know to use PyMySQL until
I12b32dc097a121bd43991bc38dd4d289b65e86c1 makes it the default
behavior.

This change removes previous code[1] enabling PyMySQL use.

[1] Ic5c1d12ab75443e1cc290a7447eeb4b452b4a9dd

Change-Id: Ic39feee0248f2ffabdba26f3779ab40a8f3838e6
Co-Authored-By: Victor Sergeyev <vsergeyev@mirantis.com>
Co-Authored-By: Cedric Brandily <zzelle@gmail.com>
9 years agoExtend default setenv instead of replacing it in tox.ini
Cedric Brandily [Tue, 23 Jun 2015 18:00:30 +0000 (20:00 +0200)]
Extend default setenv instead of replacing it in tox.ini

Some tox jobs[1] define their own setenv without extending/referencing
default setenv, it disallows to define environment variables shared by
all jobs. This change updates previous jobs[1] in order to extend
instead of replacing default setenv and enable global environement
variables (used in daughter change).

One remark, this change sets VIRTUAL_ENV environment variable in updated
jobs[1] but it has no effect on them.

[1] (dsvm-)functional, (dsvm-)fullstack and api jobs

Closes-Bug: #1468059
Change-Id: I99184f7375571fb8569a24ba04ae267108f5da08

9 years agoFix FloatingIP Namespace creation in DVR for Late Binding
Swaminathan Vasudevan [Fri, 24 Apr 2015 23:58:48 +0000 (16:58 -0700)]
Fix FloatingIP Namespace creation in DVR for Late Binding

DVR has dependency on the portbinding host to determine
where to start the FloatingIP Namespace when floatingip
is configured. But when we assign a floatingip to a port
that is not bound, even though the API will succeed, the
FloatingIP Namespace will not be created by the Agent and
so the FloatingIP will not be functional.

This patch addresses the issue by creating the Namespace
and configuring the rules when the late binding happens.

The agent will be requesting the FIP agent gateway port,
if required and then proceed to configure the FloatingIP
Namespace.

Change-Id: I9b9158bddb626c2bb535acd709452560546fd184
Closes-Bug: #1447034
Closes-Bug: #1460408

9 years agoCleanup get_plugin_name() from the tree
Ihar Hrachyshka [Tue, 23 Jun 2015 12:28:59 +0000 (14:28 +0200)]
Cleanup get_plugin_name() from the tree

It does not seem to be used since Icehouse: the patch that removed its
last usage is: 1b36e2077141749495bb32b423f3df8cbbd0eb40

I don't think we should have it as part of abstract interface for
service plugins.

Change-Id: If03f67a617efd3a7cadb96d1a86283ac14088a83

9 years agoMerge "Fix subnet creation failure on IPv6 valid gateway"
Jenkins [Tue, 23 Jun 2015 10:57:49 +0000 (10:57 +0000)]
Merge "Fix subnet creation failure on IPv6 valid gateway"

9 years agoBulk move methods to ipam_backend_mixin.py
Pavel Bondar [Tue, 23 Jun 2015 09:07:43 +0000 (12:07 +0300)]
Bulk move methods to ipam_backend_mixin.py

ipam_backend_mixin contains methods common for both backends:
pluggable and non-pluggable, so moving methods to make them accessible
by backends.
Next methods were moved from db_base_plugin_v2.py to
ipam_backend_mixin.py:
- _validate_subnet_cidr
- _validate_network_subnetpools
- _allocate_pools_for_subnet
- _save_subnet

This commit moves methods without any internal changes.
All future changes and decomposition of these methods will be handled in
next commits.

Partially-Implements: blueprint neutron-ipam

Change-Id: I1ec786754467fc9039d2276f084f1bceaab15635

9 years agoMerge "Decompose _create_subnet_from_pool"
Jenkins [Tue, 23 Jun 2015 10:01:07 +0000 (10:01 +0000)]
Merge "Decompose _create_subnet_from_pool"

9 years agoMerge "Fix l3 agent to not create already deleted router"
Jenkins [Tue, 23 Jun 2015 08:16:03 +0000 (08:16 +0000)]
Merge "Fix l3 agent to not create already deleted router"

9 years agoMerge "VMWare NSXv: Add distributed URL locking to ini"
Jenkins [Tue, 23 Jun 2015 08:09:03 +0000 (08:09 +0000)]
Merge "VMWare NSXv: Add distributed URL locking to ini"

9 years agoMerge "Move _delete_port"
Jenkins [Tue, 23 Jun 2015 08:08:51 +0000 (08:08 +0000)]
Merge "Move _delete_port"

9 years agoMerge "Decompose create_port and save_subnet"
Jenkins [Tue, 23 Jun 2015 08:00:21 +0000 (08:00 +0000)]
Merge "Decompose create_port and save_subnet"

9 years agoMerge "Python3: do not set Request.body to a text string"
Jenkins [Tue, 23 Jun 2015 07:38:48 +0000 (07:38 +0000)]
Merge "Python3: do not set Request.body to a text string"

9 years agoAdd IPset cleanup script
Brian Haley [Thu, 16 Apr 2015 20:20:01 +0000 (16:20 -0400)]
Add IPset cleanup script

This will aid in removing stale IPsets when we change the prefix
used in creating IPset names.

Change-Id: Ia9ff79c34bd4c9124ec8663a8f616ded4f389f62
Partial-Bug: #1444201

9 years agoMerge "Prepare for full stack CI job"
Jenkins [Mon, 22 Jun 2015 18:26:32 +0000 (18:26 +0000)]
Merge "Prepare for full stack CI job"

9 years agoMerge "fix rootwrap debug filter for ping all"
Jenkins [Mon, 22 Jun 2015 16:37:26 +0000 (16:37 +0000)]
Merge "fix rootwrap debug filter for ping all"

9 years agoOptimize ipset usage in IptablesFirewallDriver
Rawlin Peters [Thu, 18 Jun 2015 17:22:13 +0000 (11:22 -0600)]
Optimize ipset usage in IptablesFirewallDriver

Currently, IptablesFirewallDriver._update_ipset_members() iterates
through a list of security group IDs and makes a call to
IpsetManager.set_members() for each security group ID in the list. The
problem is that set_members() is repeatedly called with the same
arguments over and over again because the list of security group IDs
contains duplicates. These duplicated calls are unnecessary because they
are idempotent.

For instance, with a security group of 50 rules created in this manner:
    neutron security-group-rule-create $SECGRP --remote_group_id $SECGRP
        --protocol tcp --port_range_min $i --port_range_max $i

Adding a server to that security group will cause 50 calls to
IpsetManager.set_members() because the list of security group IDs is 50 of
the same ID. Only one call to IpsetManager.set_members() is necessary
per security group ID.

This patch converts that list of security group IDs into a set, which
eliminates the duplicate idempotent calls to
IpsetManager.set_members() with the same arguments. This will affect
performance by reducing the amount of file locking around ipset when
adding servers to security groups.

Change-Id: Id2c8c8c1093c8abcf1fd897b23b0358aeb55b526
Closes-Bug: 1466921

9 years agoPython3: do not set Request.body to a text string
Cyril Roelandt [Mon, 22 Jun 2015 14:59:59 +0000 (14:59 +0000)]
Python3: do not set Request.body to a text string

In Python 3, Request.body must be set to a bytes object.

Change-Id: I17785d1e9eb253a1c6cae300b207fb0a08873b0e
Blueprint: neutron-python3

9 years agoPrepare for full stack CI job
Assaf Muller [Sun, 21 Jun 2015 19:34:21 +0000 (15:34 -0400)]
Prepare for full stack CI job

Related-Bug: #1467275

Change-Id: I90f4794f48ae151a888f37df26c087a7fdcd9d31

9 years agoFix callback registry notification for security group rule
Oleg Bondarev [Tue, 2 Jun 2015 13:14:40 +0000 (16:14 +0300)]
Fix callback registry notification for security group rule

Some housekeeping was done in
 - SecurityGroupDbMixin:
   - create_rule_bulk() calls to create_rule();
   - registry notification is in create_rule();
   - separate validation for a single rule and for a group of rules
 - SecurityGroupServerRpcMixin:
   - overriden methods call to corresponding super class methods;

Hopefully code is now self-documented enough

Closes-Bug: #1461024
Change-Id: Ia75d7e206716bbe74aae89e4cebd0c2c40af68a8

9 years agoPython3: do not use __builtin__
Cyril Roelandt [Mon, 22 Jun 2015 13:02:17 +0000 (13:02 +0000)]
Python3: do not use __builtin__

It has been replaced with builtins in Python 3. Use six.moves.builtins, since
it works with Python 2 and 3.

Change-Id: I9e1b0060a5b18116d991cafb1de085d4d084db38
Blueprint: neutron-python3

9 years agoEase debugging alembic by passing proper scripts path in alembic.ini
Ihar Hrachyshka [Mon, 22 Jun 2015 13:43:20 +0000 (15:43 +0200)]
Ease debugging alembic by passing proper scripts path in alembic.ini

Otherwise, anyone who attempts to issue an alembic command with the file
gets:

  FAILED: Path doesn't exist:
  '<...>/neutron/neutron/db/migration/alembic'.  Please use the 'init'
  command to create a new scripts folder.

Change-Id: I5b5f2802b478c8d8c327d24faa838f7a6859b979

9 years agoUse string exception casting everywhere
Martin Roy [Thu, 18 Jun 2015 17:45:02 +0000 (13:45 -0400)]
Use string exception casting everywhere

Instead of the deprecated "message" member access,
casting to a string invokes the __str__ method of the exception
that is wired to return the message

Added a test of the failure cases of IpRouteCommand::delete_gateway
because they were missing

Running unit and functional tests locally no longer shows the warning
reported in the bug.

Change-Id: Ia79f526aa973ece1145615d65349f860aa3fd465
Closes-Bug: #1466542

9 years agoSwitch to oslo_utils.uuidutils
ChangBo Guo(gcb) [Tue, 3 Mar 2015 09:08:48 +0000 (17:08 +0800)]
Switch to oslo_utils.uuidutils

Get rid of oslo-incubator uuidutils

Closes-Bug: #1467020
Depends-On: I2df519965883b05d5d58cdc4785c850b0685dc2c
Depends-On: I9f8e98ad9517864a9ffdacf01c0a9a5aab554edb
Depends-On: Ied0faac809a5b72b1cd466c8babc9ca5418692c3
Change-Id: Iebe491b981b4b7c02785412fadd27678bb5e47de

9 years agoFix subnet creation failure on IPv6 valid gateway
David Edery [Sun, 21 Jun 2015 12:59:49 +0000 (15:59 +0300)]
Fix subnet creation failure on IPv6 valid gateway

Currently a valid IPv6 address gateway of the "*::ffff:ffff:ffff:ffff"
pattern is failing due to netaddr.broadcast returning value for both IPv6
and IPv4 addresses. IPv6 has no broadcast address so the fix checks if
the gateway is the subnet broadcast address only in the case of IPv4
subnet

Change-Id: I849f95b30343d0b1c90cf91203df220bf731d8d5
Closes-Bug: 1466322

9 years agoMerge "Fixes bulk insertion of data to ml2_port_binding"
Jenkins [Mon, 22 Jun 2015 08:31:08 +0000 (08:31 +0000)]
Merge "Fixes bulk insertion of data to ml2_port_binding"

9 years agoMerge "Disable keepalived process in keepalived func test"
Jenkins [Mon, 22 Jun 2015 08:18:41 +0000 (08:18 +0000)]
Merge "Disable keepalived process in keepalived func test"

9 years agoDecompose _create_subnet_from_pool
Pavel Bondar [Fri, 19 Jun 2015 14:58:57 +0000 (17:58 +0300)]
Decompose _create_subnet_from_pool

Moved validations into separate methods:
- _validate_pools_with_subnetpool
Verifies that allocation pools are set only for specific subnet request.
For any subnet request allocation pools can not be set manually
- _validate_ip_version_with_subnetpool
Verifies that subnet has the same ip version as subnet pool

Partially-Implements: blueprint neutron-ipam

Change-Id: I63f6aa2a0c94c3437fa624ac800943976f4fc50f

9 years agoMove _delete_port
Pavel Bondar [Thu, 18 Jun 2015 12:24:44 +0000 (15:24 +0300)]
Move _delete_port

Pluggable ipam implementation will do additional actions on port
deletion (deallocate ip using ipam driver).
Existing _delete_port code will be resused.
Moving _delete_port to ipam_backend_mixin to make this code
accessible and extendable by both backends (pluggable and non
pluggable).

This commit is a preparation step before pluggable ipam implementation
can be used.

Partially-Implements: blueprint neutron-ipam

Change-Id: If6cd623aad9e5501a26e5fb8cdecd5f55e85cd05

9 years agoDecompose create_port and save_subnet
Pavel Bondar [Thu, 18 Jun 2015 11:52:24 +0000 (14:52 +0300)]
Decompose create_port and save_subnet

This commit is a preparation step for enabling pluggable ipam.
Some actions in create_port and save_subnet are specific for
non pluggable ipam implementation.

- create_port
Moved allocation ips for port and storing results into separate method
_allocate_ips_for_port_and_store.
Moved to ipam_non_pluggable_backend, since pluggable implementation will
be different due to rollback on failure logic included.

- save_subnet
Moved saving allocation pools into new method _save_allocation_pools.
Moved to ipam_non_pluggable_backend, since pluggable ipam implementation
does not need to save IPAvailabilityRange (availability ranges are
maintained by ipam driver for pluggable case)

Partially-Implements: blueprint neutron-ipam

Change-Id: I4a3e5d7f3aa54630279d9589225a509c96ed2186