]> review.fuel-infra Code Review - openstack-build/neutron-build.git/log
openstack-build/neutron-build.git
9 years agoEnforce log hints in neutron.services.metering
Cedric Brandily [Tue, 11 Nov 2014 16:11:28 +0000 (17:11 +0100)]
Enforce log hints in neutron.services.metering

This change enforces log hints use and removes debug level log
translation, modifications are validated through a hacking rule.

Validate that hacking rules apply to directories:
    - neutron/services/metering

Change-Id: Ic763e81e8b06973013115af45c7c09a3e69c673b
Partial-bug: #1320867

9 years agoMerge "BSN: include missing data in floating IP call"
Jenkins [Fri, 21 Nov 2014 20:31:22 +0000 (20:31 +0000)]
Merge "BSN: include missing data in floating IP call"

9 years agoMerge "Drop RpcProxy usage from LBaaS code"
Jenkins [Fri, 21 Nov 2014 16:08:16 +0000 (16:08 +0000)]
Merge "Drop RpcProxy usage from LBaaS code"

9 years agoMerge "Enforce log hints in neutron.services.loadbalancer"
Jenkins [Fri, 21 Nov 2014 13:31:51 +0000 (13:31 +0000)]
Merge "Enforce log hints in neutron.services.loadbalancer"

9 years agoMerge "Enforce log hints in neutron.services.firewall"
Jenkins [Fri, 21 Nov 2014 13:16:40 +0000 (13:16 +0000)]
Merge "Enforce log hints in neutron.services.firewall"

9 years agoMerge "Enforce log hints in neutron.services.l3_router"
Jenkins [Fri, 21 Nov 2014 13:13:16 +0000 (13:13 +0000)]
Merge "Enforce log hints in neutron.services.l3_router"

9 years agoMerge "Show progress output while running unit tests"
Jenkins [Fri, 21 Nov 2014 10:25:31 +0000 (10:25 +0000)]
Merge "Show progress output while running unit tests"

9 years agoMerge "Prevent an iteration through ports on IPv6 slaac"
Jenkins [Fri, 21 Nov 2014 09:32:25 +0000 (09:32 +0000)]
Merge "Prevent an iteration through ports on IPv6 slaac"

9 years agoMerge "Refactor l2_pop code to pass mac/ip info more readably"
Jenkins [Fri, 21 Nov 2014 09:32:08 +0000 (09:32 +0000)]
Merge "Refactor l2_pop code to pass mac/ip info more readably"

9 years agoMerge "Enable default SNAT from networks connected to a router indirectly"
Jenkins [Fri, 21 Nov 2014 09:25:39 +0000 (09:25 +0000)]
Merge "Enable default SNAT from networks connected to a router indirectly"

9 years agoMerge "Validate local_ip for OVS agent is actual ip address"
Jenkins [Fri, 21 Nov 2014 02:26:51 +0000 (02:26 +0000)]
Merge "Validate local_ip for OVS agent is actual ip address"

9 years agoMerge "Drop and recreate FK if adding new PK to routerl3bindings"
Jenkins [Fri, 21 Nov 2014 02:25:50 +0000 (02:25 +0000)]
Merge "Drop and recreate FK if adding new PK to routerl3bindings"

9 years agoMerge "enable H237 check"
Jenkins [Fri, 21 Nov 2014 02:03:42 +0000 (02:03 +0000)]
Merge "enable H237 check"

9 years agoMerge "Remove default dictionary from function def"
Jenkins [Fri, 21 Nov 2014 00:42:05 +0000 (00:42 +0000)]
Merge "Remove default dictionary from function def"

9 years agoMerge "Remove useless return"
Jenkins [Fri, 21 Nov 2014 00:13:58 +0000 (00:13 +0000)]
Merge "Remove useless return"

9 years agoMerge "Add rootwrap filters for ofagent"
Jenkins [Fri, 21 Nov 2014 00:13:44 +0000 (00:13 +0000)]
Merge "Add rootwrap filters for ofagent"

9 years agoMerge "BSN: Optimistic locking strategy for consistency"
Jenkins [Fri, 21 Nov 2014 00:13:29 +0000 (00:13 +0000)]
Merge "BSN: Optimistic locking strategy for consistency"

9 years agoMerge "NSX: Validate gateway device list against DB"
Jenkins [Fri, 21 Nov 2014 00:12:33 +0000 (00:12 +0000)]
Merge "NSX: Validate gateway device list against DB"

9 years agoMerge "Update i18n translation for neutron.server/scheduler log msg's"
Jenkins [Thu, 20 Nov 2014 21:36:02 +0000 (21:36 +0000)]
Merge "Update i18n translation for neutron.server/scheduler log msg's"

9 years agoMerge "Updated from global requirements"
Jenkins [Thu, 20 Nov 2014 21:24:20 +0000 (21:24 +0000)]
Merge "Updated from global requirements"

9 years agoShow progress output while running unit tests
Russell Bryant [Thu, 20 Nov 2014 21:01:14 +0000 (21:01 +0000)]
Show progress output while running unit tests

This patch imports some magic to enable showing test output as the
tests run.  Seeing output showing tests as they execute is reassuring
that the test run is continuing to make progress.  This originated in
tempest and was then brought over to Nova in this commit:

  https://review.openstack.org/#/c/121914/

Note the justification in that commit to just copy it instead of move
it to a shared repo.

To get the old behavior where you only get output when something
fails, you can set the TRACE_FAILONLY env var.  That originated in
this commit in Nova:

  https://review.openstack.org/#/c/123801/

Change-Id: I6a079ad5f630383650c0f9dee09e04250d0e2c5a

9 years agoDrop RpcProxy usage from LBaaS code
Russell Bryant [Tue, 18 Nov 2014 16:50:31 +0000 (16:50 +0000)]
Drop RpcProxy usage from LBaaS code

Update the LBaaS code to stop using the RpcProxy compatibility class.
The equivalent direct usage of oslo.messaging APIs are now used
instead.

Part of blueprint drop-rpc-compat.

Change-Id: I381394507e4f2daf6d774f70087fef8833c9bab5

9 years agoMerge "Drop RpcProxy usage from FWaaS code"
Jenkins [Thu, 20 Nov 2014 20:10:25 +0000 (20:10 +0000)]
Merge "Drop RpcProxy usage from FWaaS code"

9 years agoMerge "Drop RpcProxy usage from neutron.agent.rpc.PluginApi"
Jenkins [Thu, 20 Nov 2014 20:10:10 +0000 (20:10 +0000)]
Merge "Drop RpcProxy usage from neutron.agent.rpc.PluginApi"

9 years agoMerge "linuxbridge-agent: make vxlan unicast check more efficent"
Jenkins [Thu, 20 Nov 2014 20:09:28 +0000 (20:09 +0000)]
Merge "linuxbridge-agent: make vxlan unicast check more efficent"

9 years agoMerge "Imported Translations from Transifex"
Jenkins [Thu, 20 Nov 2014 20:09:03 +0000 (20:09 +0000)]
Merge "Imported Translations from Transifex"

9 years agoMerge "Ignore top-level hidden dirs/files by default"
Jenkins [Thu, 20 Nov 2014 20:08:46 +0000 (20:08 +0000)]
Merge "Ignore top-level hidden dirs/files by default"

9 years agoMerge "Check for default sec-group made case insensitive"
Jenkins [Thu, 20 Nov 2014 19:45:51 +0000 (19:45 +0000)]
Merge "Check for default sec-group made case insensitive"

9 years agoMerge "Update i18n translation for neutron.notifiers log msg's"
Jenkins [Thu, 20 Nov 2014 19:35:30 +0000 (19:35 +0000)]
Merge "Update i18n translation for neutron.notifiers log msg's"

9 years agoMerge "Update i18n translation for neutron.common/debug log msg's"
Jenkins [Thu, 20 Nov 2014 19:24:33 +0000 (19:24 +0000)]
Merge "Update i18n translation for neutron.common/debug log msg's"

9 years agoMerge "Big Switch: Send notification after port update"
Jenkins [Thu, 20 Nov 2014 18:06:51 +0000 (18:06 +0000)]
Merge "Big Switch: Send notification after port update"

9 years agoEnforce log hints in neutron.services.loadbalancer
Cedric Brandily [Tue, 11 Nov 2014 16:01:54 +0000 (17:01 +0100)]
Enforce log hints in neutron.services.loadbalancer

This change enforces log hints use and removes debug level log
translation, modifications are validated through a hacking rule and
the change respects loggging guidelines.

Validate that hacking rules apply to directories:
    - neutron/services/loadbalancer

Change-Id: I5f2a1a8861728399f3852fc9704eb160c35f7f8d
Partial-bug: #1320867

9 years agoEnforce log hints in neutron.services.firewall
Cedric Brandily [Tue, 11 Nov 2014 15:00:57 +0000 (16:00 +0100)]
Enforce log hints in neutron.services.firewall

This change enforces log hints use and removes debug level log
translation, modifications are validated through a hacking rule.

Validate that hacking rules apply to directories:
    - neutron/services/firewall

Change-Id: Ie3f75fe207652cbd800cef067a89a819696d1f3a
Partial-bug: #1320867

9 years agoEnforce log hints in neutron.services.l3_router
Cedric Brandily [Tue, 11 Nov 2014 14:26:14 +0000 (15:26 +0100)]
Enforce log hints in neutron.services.l3_router

This change enforces log hints use and removes debug level log
translation, modifications are validated through a hacking rule.

Validate that hacking rules apply to directories:
    - neutron/services/l3_router

Change-Id: I2a832c5e0c4ed2a944d199d6a2d6233b8cf838dd
Partial-bug: #1320867

9 years agoenable H237 check
Mark McClain [Thu, 12 Jun 2014 06:10:48 +0000 (02:10 -0400)]
enable H237 check

Remove the remove use of 'new' module by properly patching the instance
object.  Additionally, enable the H237 (module is removed in Python 3) check

Change-Id: I7407600478de218a4294c4bfd774cd4cf7e1741e
Partial-Bug: 1329017

9 years agoUpdated from global requirements
OpenStack Proposal Bot [Thu, 20 Nov 2014 14:06:53 +0000 (14:06 +0000)]
Updated from global requirements

Change-Id: I40640d56c48b376d876908d7e004971f80228095

9 years agoCheck for default sec-group made case insensitive
abhishek.talwar [Tue, 18 Nov 2014 09:50:51 +0000 (15:20 +0530)]
Check for default sec-group made case insensitive

Currently creating another security group with name
"default" is not allowed, however we can create
another security group with name "DEFAULT"
(or any other CASE pattern).

When trying to boot a VM without specifying
a security group it should always pick the
"default" security group. However, if another
security group of the name DEFAULT is present,
the VM gets associated with the wrong
security group (i.e DEFAULT and not default).

So, updated the code so that a security group
with name DEFAULT (or any other case pattern)
is not allowed.
Closes-Bug: #1384505

Change-Id: I3bc4e48cf723bcf74e098d7ef66df0333f6a8686

9 years agoMerge "Use a string multiplier instead of 59 repetitions"
Jenkins [Thu, 20 Nov 2014 09:23:16 +0000 (09:23 +0000)]
Merge "Use a string multiplier instead of 59 repetitions"

9 years agoMerge "Fix a copy/pasted test mistake"
Jenkins [Thu, 20 Nov 2014 08:53:53 +0000 (08:53 +0000)]
Merge "Fix a copy/pasted test mistake"

9 years agoMerge "Drop test code copied from nova"
Jenkins [Thu, 20 Nov 2014 08:53:40 +0000 (08:53 +0000)]
Merge "Drop test code copied from nova"

9 years agoMerge "Drop several uses of RpcCallback"
Jenkins [Thu, 20 Nov 2014 08:53:25 +0000 (08:53 +0000)]
Merge "Drop several uses of RpcCallback"

9 years agoMerge "Add some basic rpc api docs"
Jenkins [Thu, 20 Nov 2014 08:45:13 +0000 (08:45 +0000)]
Merge "Add some basic rpc api docs"

9 years agoMerge "Drop RpcCallback usage from DhcpRpcCallback"
Jenkins [Thu, 20 Nov 2014 08:44:59 +0000 (08:44 +0000)]
Merge "Drop RpcCallback usage from DhcpRpcCallback"

9 years agoMerge "Fix a race condition adding a security group rule"
Jenkins [Thu, 20 Nov 2014 07:55:39 +0000 (07:55 +0000)]
Merge "Fix a race condition adding a security group rule"

9 years agoUpdate i18n translation for neutron.server/scheduler log msg's
Gary Kotton [Tue, 11 Nov 2014 13:43:55 +0000 (05:43 -0800)]
Update i18n translation for neutron.server/scheduler log msg's

Validate that hacking rules apply to directories:
- neutron/scheduler
- neutron/server

Change-Id: I1353f5c8b01f85e4995ee1fb23a066506ed98e3f
Partial-bug: #1320867

9 years agoUpdate i18n translation for neutron.notifiers log msg's
Gary Kotton [Tue, 11 Nov 2014 13:28:21 +0000 (05:28 -0800)]
Update i18n translation for neutron.notifiers log msg's

Validate that hacking rules apply to directories:
 - neutron/notifiers
 - neutron/openstack (this is already 'clean')

Change-Id: I37b8c45e20d2f59e4e9f5d80d5dc87f19a7a8b3a
Partial-bug: #1320867

9 years agoUpdate i18n translation for neutron.common/debug log msg's
Gary Kotton [Tue, 11 Nov 2014 13:19:19 +0000 (05:19 -0800)]
Update i18n translation for neutron.common/debug log msg's

Validate that hacking rules apply to directories:
    - neutron/common
    - neutron/hacking
    - neutron/debug
    - neutron/locale

Change-Id: I177f5fa5fb7cfdcf332949933aa4bd755a90bb94
Partial-bug: #1320867

9 years agoImported Translations from Transifex
OpenStack Proposal Bot [Thu, 20 Nov 2014 06:08:36 +0000 (06:08 +0000)]
Imported Translations from Transifex

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

Change-Id: I23309c925c4be60fffc5919c2c9c6cf096022001

9 years agoMerge "Fix hostname regex pattern"
Jenkins [Thu, 20 Nov 2014 01:41:30 +0000 (01:41 +0000)]
Merge "Fix hostname regex pattern"

9 years agoMerge "Drop RpcProxy usage from PluginReportStateAPI"
Jenkins [Wed, 19 Nov 2014 23:31:52 +0000 (23:31 +0000)]
Merge "Drop RpcProxy usage from PluginReportStateAPI"

9 years agoMerge "Correct raw table regex in test_security_groups_rpc"
Jenkins [Wed, 19 Nov 2014 22:31:20 +0000 (22:31 +0000)]
Merge "Correct raw table regex in test_security_groups_rpc"

9 years agoMerge "Update i18n translation for neutron.api log msg's"
Jenkins [Wed, 19 Nov 2014 22:20:05 +0000 (22:20 +0000)]
Merge "Update i18n translation for neutron.api log msg's"

9 years agoFix a race condition adding a security group rule
Brian Haley [Wed, 19 Nov 2014 17:10:57 +0000 (12:10 -0500)]
Fix a race condition adding a security group rule

setup_port_filters() needs to grab self.devices_to_refilter
before it calls prepare_devices_filter(), else it could skip
processing a device if an RPC arrives while it's processing
new devices.  That device will now be handled the next time
it's called.

Bug introduced in commit 3046c4ae22b1

Change-Id: Ib2f460cc095bbea8f9c767dcb9b4d4b66f1a7811
Closes-Bug: 1393925

9 years agoMerge "Subnet delete for IPv6 SLAAC should not require prior port disassoc"
Jenkins [Wed, 19 Nov 2014 19:20:37 +0000 (19:20 +0000)]
Merge "Subnet delete for IPv6 SLAAC should not require prior port disassoc"

9 years agoMerge "ofagent: Remove obsolete bridge_mappings (agent side)"
Jenkins [Wed, 19 Nov 2014 19:20:23 +0000 (19:20 +0000)]
Merge "ofagent: Remove obsolete bridge_mappings (agent side)"

9 years agoMerge "Moved out common testcases from test_type_vxlan.py"
Jenkins [Wed, 19 Nov 2014 19:20:08 +0000 (19:20 +0000)]
Merge "Moved out common testcases from test_type_vxlan.py"

9 years agoDrop RpcProxy usage from FWaaS code
Russell Bryant [Tue, 18 Nov 2014 14:46:06 +0000 (14:46 +0000)]
Drop RpcProxy usage from FWaaS code

This patch removes the usage of the RpcProxy compatibility class from
the FWaaS code.  The equivalent direct usage of oslo.messaging APIs
are now used instead.

Part of blueprint drop-rpc-compat.

Change-Id: I1bab4dcd376d4e9684fee1edc97fd29a61ba38de

9 years agoDrop RpcProxy usage from neutron.agent.rpc.PluginApi
Russell Bryant [Fri, 14 Nov 2014 14:21:05 +0000 (14:21 +0000)]
Drop RpcProxy usage from neutron.agent.rpc.PluginApi

This patch removes the usage of the RpcProxy compatibility class from
the neutron.agent.rpc.PluginApi class.  The equivalent use of
oslo.messaging APIs have been put in place instead.  This simple
conversion had a pretty wide impact on unit tests, as well.

The security groups API was converted in this patch as well.  It was
necessary because the security group class is used as a mixin, so it
must be implemented the same way.  Unfortunately, the way this is used
as a mix-in is not consistent, so for now it's only conditionally
converted.

Finally, some other miscellaneous plugin specific interfaces were
converted as well.  Again, these were methods mixed-in for certain
plugins.

Note that there's one very minor functional difference in this patch.
The previous code set the base version to be '1.1'.  The right pattern
is for this to be set to '1.0'.  This version is the default version
specified by the client, telling the server that it must implement at
least this version to satisfy the request.  The default should be
'1.0' and methods that require higher than that should specify it.
From looking at other parts of the code, '1.0' vs '1.1' is not
actually important, as '1.1' was actually the addition of some
security group methods defined elsewhere.  The correction is more
about establishing the right pattern to follow.

Change-Id: I391c01e79943ef179d815ea602253720925ccce1

9 years agoFix a copy/pasted test mistake
Russell Bryant [Mon, 17 Nov 2014 21:33:06 +0000 (21:33 +0000)]
Fix a copy/pasted test mistake

Fix a minor test mistake that was copied around a few times.  In mock
setup, the intention was to only return a value of the rpc method used
was a 'call', not 'cast'.  Unfortunately, the variable checked was
method instead of rpc_method, so this expected return was always set
to None.

This also points out that what's being tested here isn't what *really*
was intended.  It ends up testing that the code returns what we mocked
it to return, which isn't all that useful.  However, at least with
this fix it's a bit more clear what it's trying to do.

Change-Id: I18e85aa66f83331318177d70cbae2468ff8bb57d

9 years agoDrop test code copied from nova
Russell Bryant [Mon, 17 Nov 2014 20:14:04 +0000 (20:14 +0000)]
Drop test code copied from nova

Drop a couple of lines of test code that originated in nova and got
copied into Neutron.  These lines are meaningless in Neutron and can
be removed.

Change-Id: Ic7c174ba0671ddd4a9403b74fa42e7944fe74145

9 years agoDrop several uses of RpcCallback
Russell Bryant [Thu, 13 Nov 2014 21:31:10 +0000 (21:31 +0000)]
Drop several uses of RpcCallback

This patch drops several uses of the RpcCallback compatibility class.
All of these were trivial and straight forward conversions so I
batched them up.

There are still several other uses of RpcCallback, but the conversions
are were not necessarily trivial, and may be broken in one way or
another, so I wanted to address them separately.  In particular, the
use of mixin classes means that there could be cases where the version
declaration is being stepped on, so they need to be investigated more
closely.

Part of blueprint drop-rpc-compat.

Change-Id: I0977aee863d4fcc6a14a025215c6e41fe38a87f0

9 years agoAdd some basic rpc api docs
Russell Bryant [Wed, 12 Nov 2014 21:37:24 +0000 (21:37 +0000)]
Add some basic rpc api docs

The devref docs had a placeholder file for rpc API docs.  Now that
both a client side and server side interface have been converted from
the rpc compat layer to oslo.messaging APIs, add some docs that give
an overview of what the client and server sides look like.

Also include a section that describes the code layout of where you can
find client and server api implementations in the neutron code base.
It starts by discussing the DHCP agent related APIs.

Part of blueprint drop-rpc-compat.

Change-Id: Ib391958252077365a81bcb881ab27a078f71fdec

9 years agoDrop RpcCallback usage from DhcpRpcCallback
Russell Bryant [Wed, 12 Nov 2014 18:33:45 +0000 (18:33 +0000)]
Drop RpcCallback usage from DhcpRpcCallback

Drop the usage of the RpcCallback compatibility class from
DhcpRpcCallback.

Part of blueprint drop-rpc-compat.

Change-Id: I7c4654455c15c4a545c8b19bfcbf617e6d6593d6

9 years agoDrop RpcProxy usage from PluginReportStateAPI
Russell Bryant [Tue, 11 Nov 2014 19:23:15 +0000 (14:23 -0500)]
Drop RpcProxy usage from PluginReportStateAPI

Drop the usage of the RpcProxy compatibility class from the
PluginReportStateAPI rpc client class.  It now uses the appropriate
oslo.messaging APIs directly, instead.

Part of blueprint drop-rpc-compat.

Change-Id: I7101331a556bd0a5c8f782ae6cb4103151e6c45c

9 years agoMerge "Convert all incoming protocol numbers to string"
Jenkins [Wed, 19 Nov 2014 16:40:03 +0000 (16:40 +0000)]
Merge "Convert all incoming protocol numbers to string"

9 years agoMerge "Use correct base class for unit tests for ML2 drivers"
Jenkins [Wed, 19 Nov 2014 15:24:37 +0000 (15:24 +0000)]
Merge "Use correct base class for unit tests for ML2 drivers"

9 years agoFix hostname regex pattern
John Perkins [Mon, 6 Oct 2014 21:24:57 +0000 (16:24 -0500)]
Fix hostname regex pattern

Current hostname_pattern regex complexity grows exponentially
when given a string of just digits, which can be exploited to
cause neutron-server to freeze.

Change-Id: I886c6d883a9cb0acd9908495eec50bf0411d8ba8
Closes-bug: #1378450

9 years agoMerge "Switch run-time import to using importutils.import_module"
Jenkins [Wed, 19 Nov 2014 11:49:20 +0000 (11:49 +0000)]
Merge "Switch run-time import to using importutils.import_module"

9 years agoMerge "Catch DBReferenceError exception during binding a router"
Jenkins [Wed, 19 Nov 2014 10:59:13 +0000 (10:59 +0000)]
Merge "Catch DBReferenceError exception during binding a router"

9 years agoMerge "Imported Translations from Transifex"
Jenkins [Wed, 19 Nov 2014 10:11:48 +0000 (10:11 +0000)]
Merge "Imported Translations from Transifex"

9 years agoMerge "Updated from global requirements"
Jenkins [Wed, 19 Nov 2014 09:16:10 +0000 (09:16 +0000)]
Merge "Updated from global requirements"

9 years agoUpdate i18n translation for neutron.api log msg's
Gary Kotton [Mon, 10 Nov 2014 16:19:06 +0000 (08:19 -0800)]
Update i18n translation for neutron.api log msg's

Validate that hacking rules apply to directory neutron/api

Change-Id: Idd54964dbb3a48505c20117c79ce57913a7f1c12
Partial-bug: #1320867

9 years agoCatch DBReferenceError exception during binding a router
Eugene Nikanorov [Mon, 17 Nov 2014 16:49:09 +0000 (20:49 +0400)]
Catch DBReferenceError exception during binding a router

In some cases (Concurrent API tests) router can be deleted
before it is bound to an agent by scheduler.
That may lead to traces on L3 agent side returned via RPC.
Need to handle this case in more graceful way.

Change-Id: Ic52c26ace7f32a615150bd6098b244ae0b98250c
Closes-Bug: #1385257

9 years agoEnable default SNAT from networks connected to a router indirectly
Itsuro Oda [Wed, 29 Oct 2014 23:00:07 +0000 (08:00 +0900)]
Enable default SNAT from networks connected to a router indirectly

Make outgoing packets to an external interface SNATed regardless
of source address of the packets. As a result of deep review,
any problem was not found with this change.

Change-Id: I71a1288633bb6af2951d571540bbb9ec5e1270e2
Closes-bug: #1386041

9 years agoImported Translations from Transifex
OpenStack Proposal Bot [Wed, 19 Nov 2014 06:08:17 +0000 (06:08 +0000)]
Imported Translations from Transifex

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

Change-Id: Ia8c01192a4c572a18bdcf987c188febb0c0a42f7

9 years agoBSN: Optimistic locking strategy for consistency
Kevin Benton [Fri, 26 Sep 2014 04:42:39 +0000 (21:42 -0700)]
BSN: Optimistic locking strategy for consistency

Summary:
  Adds an optimistic locking strategy for the Big Switch
  server manager so multiple Neutron servers wanting to
  communicate with the backend do not receive the consistency
  hash for use simultaneously.

  The bsn-rest-call semaphore is removed because serialization
  is now provided by the new locking scheme.

  A new DB engine is added because the consistency hashes
  need a life-cycle with rollbacks and other DB operations
  than cannot impact or be impacted by database operations
  happening on the regular Neutron objects.

  Unit tests are included for each of the new branches
  introduced.

Problem Statement:
  Requests to the Big Switch controllers must contain the
  consistency hash value received from the previous update.
  Otherwise, an inconsistency error will be triggered which
  will force a synchronization. Essentially, a new backend
  call must be prevented from reading from the consistency
  hash table in the DB until the previous call has updated
  the table with the hash from the server response.

  This can be addressed by a semaphore around the rest_call
  function for the single server use case and by a table lock
  on the consistency table for multiple Neutron servers.
  However, both solutions are inadequate because a single
  Neutron server does not scale and a table lock is not
  supported by common SQL HA deployments (e.g. Galera).

  This issue was previously addressed by deploying servers
  in an active-standby configuration. However, that only
  prevented the problem for HTTP API calls. All Neutron
  servers would respond to RPC messages, some of which would
  result in a port update and possible backend call which
  would trigger a conflict if it happened at the same time
  as a backend call from another server. These unnecessary
  syncs are unsustainable as the topology increases beyond
  ~3k VMs.

  Any solution needs to be back-portable to Icehouse so new
  database tables, new requirements, etc. are all out of the
  question.

Solution:
  This patch stores the lock for the consistency hash as a part
  of the DB record. The guaruntees the database offers around
  atomic insertion and constrained atomic updates offer the
  primitives necessary to ensure that only one process/thread
  can lock the record at once.

  The read_for_update method is modified to not return the hash
  in the database until an identifier is inserted into the
  current record or added as a new record. By using an UPDATE
  query with a WHERE clause restricting to the current state,
  only one of many concurrent callers to the DB will successfully
  update the rows. If a caller sees that it didn't update any
  rows, it will start the process over of trying to get the
  lock.

  If a caller observes that the same ID has the lock for
  more than 60 seconds, it will assume the holder has
  died and will attempt to take the lock. This is also done
  in a concurrency-safe UPDATE call since there may be many
  other callers may attempt to do the same thing. If it
  fails and the lock was taken by someone else, the process
  will start over.

  Some pseudo-code resembling the logic:
    read_current_lock
    if no_record:
      insert_lock
      sleep_and_retry if constraint_violation else return
    if current_is_locked and not timer_exceeded:
      sleep_and_retry
    if update_record_with_lock:
      return
    else:
      sleep_and_retry

Closes-Bug: #1374261
Change-Id: Ifa5a7c9749952bc2785a9bf3fed69ad55bf21acc

9 years agoMerge "BSN: Set inconsistency record on delete failure"
Jenkins [Wed, 19 Nov 2014 04:41:11 +0000 (04:41 +0000)]
Merge "BSN: Set inconsistency record on delete failure"

9 years agoBSN: include missing data in floating IP call
Kevin Benton [Tue, 18 Nov 2014 09:42:34 +0000 (01:42 -0800)]
BSN: include missing data in floating IP call

Includes some missing floating IP data in an optimized
floating IP API that was previously unused.

Closes-Bug: #1394030
Change-Id: Icba2f837dbc3838f86d125d261b5e2325000c618

9 years agoMerge "Drop RpcProxy usage from MetadataPluginApi"
Jenkins [Wed, 19 Nov 2014 03:04:17 +0000 (03:04 +0000)]
Merge "Drop RpcProxy usage from MetadataPluginApi"

9 years agoMerge "Drop usage of RpcProxy from L3PluginApi"
Jenkins [Wed, 19 Nov 2014 03:01:39 +0000 (03:01 +0000)]
Merge "Drop usage of RpcProxy from L3PluginApi"

9 years agoofagent: Remove obsolete bridge_mappings (agent side)
YAMAMOTO Takashi [Mon, 20 Oct 2014 05:44:13 +0000 (14:44 +0900)]
ofagent: Remove obsolete bridge_mappings (agent side)

For ofagent, it has been superseded by physical_interface_mappings
and was planned to be removed in Kilo.

Related: blueprint ofagent-physical-interface-mappings
Change-Id: I68c7e9991a3dc14ccad709ed1a438c7c45420dd6

9 years agoNSX: Validate gateway device list against DB
Salvatore [Mon, 1 Sep 2014 12:37:00 +0000 (14:37 +0200)]
NSX: Validate gateway device list against DB

This patch adds a check for validating the devices for a network
gateway are defined in the neutron DB before the request for
creating the network gateway is sent to the NSX backend.

Change-Id: Ic2245f965da332dbaee4ab5a869ce47f06a9e6ce
Partial-Bug: #1319581

9 years agoMerge "Execute udevadm on other linux installs"
Jenkins [Tue, 18 Nov 2014 21:37:13 +0000 (21:37 +0000)]
Merge "Execute udevadm on other linux installs"

9 years agoMerge "Cleanup and refactor methods in unit/test_security_groups_rpc"
Jenkins [Tue, 18 Nov 2014 20:30:30 +0000 (20:30 +0000)]
Merge "Cleanup and refactor methods in unit/test_security_groups_rpc"

9 years agoMerge "Update i18n translation for neutron.extension log msg's"
Jenkins [Tue, 18 Nov 2014 20:30:14 +0000 (20:30 +0000)]
Merge "Update i18n translation for neutron.extension log msg's"

9 years agoMerge "Update i18n translation for neutron.db log msg's"
Jenkins [Tue, 18 Nov 2014 20:29:57 +0000 (20:29 +0000)]
Merge "Update i18n translation for neutron.db log msg's"

9 years agoMerge "Include call to delete_subnet from delete_network at DB level"
Jenkins [Tue, 18 Nov 2014 20:27:04 +0000 (20:27 +0000)]
Merge "Include call to delete_subnet from delete_network at DB level"

9 years agoDrop RpcProxy usage from MetadataPluginApi
Russell Bryant [Fri, 7 Nov 2014 21:10:09 +0000 (22:10 +0100)]
Drop RpcProxy usage from MetadataPluginApi

Drop the usage of the RpcProxy compatibility class from
MetadataPluginApi.  The equivalent direct usage of oslo.messaging APIs
are used instead.

Part of blueprint drop-rpc-compat.

Change-Id: I1764dd715237bc76dae2789121850f69b8f82888

9 years agoDrop usage of RpcProxy from L3PluginApi
Russell Bryant [Fri, 7 Nov 2014 15:30:15 +0000 (16:30 +0100)]
Drop usage of RpcProxy from L3PluginApi

Drop the usage of the RpcProxy compatibility class from the
L3PluginApi.  The equivalent direct usage of the oslo.messaging APIs
are now being used instead.

Part of blueprint drop-rpc-compat.

Change-Id: I6639d1aa8acca8c0544020e28489e71f3d5d2955

9 years agoPrevent an iteration through ports on IPv6 slaac
Kevin Benton [Tue, 18 Nov 2014 16:34:56 +0000 (08:34 -0800)]
Prevent an iteration through ports on IPv6 slaac

A recent change[1] allowed subnets to be deleted even if they
had active IPv6 SLAAC allocations on them. The updated check
was inefficient because it would check every port in the subnet
even if the subnet was a SLAAC subnet. This patch just shortcuts
out that check.

1. I281f5a1553248e09174dc49d0a42aef4b5c44bee

Change-Id: I2c35495b3642c644e4758f28ccddcc076139ec3b

9 years agoUse a string multiplier instead of 59 repetitions
Kevin Benton [Tue, 18 Nov 2014 15:51:08 +0000 (07:51 -0800)]
Use a string multiplier instead of 59 repetitions

A recently added test case added a long string of repeated 1's
which required a #noqa flag. A string multiplier represents the
same thing in a much shorter fashion.

Change-Id: I2f4d5568b3e132781fc51bd2e9b3efd44c549689

9 years agoConvert all incoming protocol numbers to string
Ann Kamyshnikova [Mon, 10 Nov 2014 14:05:54 +0000 (17:05 +0300)]
Convert all incoming protocol numbers to string

PostgreSQL is more sensitive for types than MySQL when it selects
something from columns in database. So it fails when it tries to
select from string field comparing with integer value.

Added unit test to verify conversion of protocol numbers to
strings.

Closes-bug:#1381379

Change-Id: I0a29595403a07c66888871088d5549705a097f68

9 years agoUpdated from global requirements
OpenStack Proposal Bot [Tue, 18 Nov 2014 11:32:10 +0000 (11:32 +0000)]
Updated from global requirements

Change-Id: Ie86ce0bd15761b237385007a7905ac1317f0bfff

9 years agoMerge "Update i18n translation for neutron.cmd log msg's"
Jenkins [Tue, 18 Nov 2014 11:14:27 +0000 (11:14 +0000)]
Merge "Update i18n translation for neutron.cmd log msg's"

9 years agoMerge "Update i18n translation for neutron.agents log msg's"
Jenkins [Tue, 18 Nov 2014 11:12:55 +0000 (11:12 +0000)]
Merge "Update i18n translation for neutron.agents log msg's"

9 years agoCorrect raw table regex in test_security_groups_rpc
Cedric Brandily [Tue, 18 Nov 2014 09:59:31 +0000 (10:59 +0100)]
Correct raw table regex in test_security_groups_rpc

Currently in test_security_groups_rpc, raw table regex uses nat table
chains regex but raw table chains[1] is a strict subset of nat table
chains[2] so a more strict regex should be used as raw table chains
regex.

[1] OUTPUT, PREROUTING
[2] OUTPUT, POSTROUTING, PREROUTING, float-snat, snat

Change-Id: I6f32cda917c2f882f5fd17b6fa105def5572cdef

9 years agoMerge "enable F812 check for flake8"
Jenkins [Tue, 18 Nov 2014 00:56:20 +0000 (00:56 +0000)]
Merge "enable F812 check for flake8"

9 years agoMerge "Fix L2 agent does not remove unused ipset set"
Jenkins [Tue, 18 Nov 2014 00:35:35 +0000 (00:35 +0000)]
Merge "Fix L2 agent does not remove unused ipset set"

9 years agoBSN: Set inconsistency record on delete failure
Kevin Benton [Thu, 2 Oct 2014 18:26:50 +0000 (11:26 -0700)]
BSN: Set inconsistency record on delete failure

Set a bad value in the consistency DB on a delete
failure so a sync is triggered the next time the backend
servers become available.

This fixes the issue where the backend servers are unavailable
when an object is deleted from ML2 but not deleted from the
backend.

Closes-Bug: #1377350
Change-Id: I24713a03af4d3499645241f900de1f572689c235

9 years agoSubnet delete for IPv6 SLAAC should not require prior port disassoc
Dane LeBlanc [Mon, 17 Nov 2014 15:40:04 +0000 (10:40 -0500)]
Subnet delete for IPv6 SLAAC should not require prior port disassoc

With the current Neutron implementation, a subnet cannot be deleted
until all associated IP addresses have been remove from ports (via
port update) or the associated ports/VMs have been deleted.

In the case of SLAAC-enabled subnets, however, it's not feasible to
require removal of SLAAC-generated addresses individually from each
associated port before deleting a subnet because of the multicast
nature of RA messages. For SLAAC-enabled subnets, the processing of
subnet delete requests needs to be changed so that these subnets will
be allowed to be deleted, and all ports get disassociated from their
corresponding SLAAC IP address, when there are ports existing on
the SLAAC subnet.

Change-Id: I281f5a1553248e09174dc49d0a42aef4b5c44bee
Closes-Bug: 1393435