]> review.fuel-infra Code Review - openstack-build/neutron-build.git/log
openstack-build/neutron-build.git
9 years agoMerge "ML2: move L3 cleanup out of network transaction"
Jenkins [Wed, 1 Oct 2014 09:08:12 +0000 (09:08 +0000)]
Merge "ML2: move L3 cleanup out of network transaction"

9 years agoML2: move L3 cleanup out of network transaction
Kevin Benton [Tue, 30 Sep 2014 03:21:23 +0000 (20:21 -0700)]
ML2: move L3 cleanup out of network transaction

Move _process_l3_delete out of the delete_network
transaction to eliminate the semaphore deadlock that
occurs when it tries to delete the ports associated
with existing floating IPs.

It makes more sense to live outside of the transaction
anyway because the operations it performs cannot be
rolled back only in the database if the L3 plugin makes
external calls for floating IP creation/deletion.
e.g. if delete_floatingip is successful, it may have
deleted external resources and restoring the DB records
would make things inconsistent.

If a failure to delete the network does occur, any cleanup
done by _process_l3_delete will not be reversed.

Closes-Bug: #1374573
Change-Id: I3ae7bb269df9b9dcef94f48f13f1bde1e4106a80

9 years agoImported Translations from Transifex
OpenStack Proposal Bot [Tue, 30 Sep 2014 06:49:06 +0000 (06:49 +0000)]
Imported Translations from Transifex

Change-Id: Ie7ba4679ca128ff636b6bd841072dfd4b7e4236f

9 years agoMerge "Rename workers to api_workers and simplify code"
Jenkins [Mon, 29 Sep 2014 16:58:40 +0000 (16:58 +0000)]
Merge "Rename workers to api_workers and simplify code"

9 years agoMerge "Do not assume order of report list elements"
Jenkins [Mon, 29 Sep 2014 16:58:13 +0000 (16:58 +0000)]
Merge "Do not assume order of report list elements"

9 years agoDo not assume order of report list elements
johndavidge [Fri, 8 Aug 2014 11:48:59 +0000 (04:48 -0700)]
Do not assume order of report list elements

This fixes the test_report_multiple_services unit test that breaks with a
randomized PYTHONHASHSEED (see the bug report).

The test assumed that the report list from self.driver.report_status() had
elements in a particular order. Found with PYTHONHASHSEED=2455351445.

The fix refactors the test case to handle an unsorted report list by
sorting it before checking equality.

Partial-bug: #1348818

Note: There are several other unrelated unit tests that also break with a
randomized PYTHONHASHSEED, but they are not addressed here. They will be
addressed in separate patches.

Change-Id: I542c3818821fa2f6e460fd254a3842530ecea8d9

9 years agoImported Translations from Transifex
OpenStack Proposal Bot [Mon, 29 Sep 2014 06:04:31 +0000 (06:04 +0000)]
Imported Translations from Transifex

Change-Id: I585e3df5504fcc071811e0ec9f925bc493584b2f

9 years agoMerge "Fix broken port query in Extraroute test case"
Jenkins [Mon, 29 Sep 2014 03:56:34 +0000 (03:56 +0000)]
Merge "Fix broken port query in Extraroute test case"

9 years agoMerge "Do not assume order of body and tags elements"
Jenkins [Sat, 27 Sep 2014 22:42:56 +0000 (22:42 +0000)]
Merge "Do not assume order of body and tags elements"

9 years agoMerge "Revert "Cleanup floatingips also on router delete""
Jenkins [Sat, 27 Sep 2014 17:54:59 +0000 (17:54 +0000)]
Merge "Revert "Cleanup floatingips also on router delete""

9 years agoMerge "Add unit tests covering single operations to ODL"
Jenkins [Sat, 27 Sep 2014 15:20:17 +0000 (15:20 +0000)]
Merge "Add unit tests covering single operations to ODL"

9 years agoMerge "Eliminate OrderedDict from test_api_v2.py"
Jenkins [Sat, 27 Sep 2014 15:04:49 +0000 (15:04 +0000)]
Merge "Eliminate OrderedDict from test_api_v2.py"

9 years agoFix broken port query in Extraroute test case
Kevin Benton [Sat, 20 Sep 2014 07:17:58 +0000 (00:17 -0700)]
Fix broken port query in Extraroute test case

One of the queries in an extra route test case tries
to filter based on the port owner, but the _list_ports
method it calls doesn't take a device_owner parameter.
This can cause failures if a DHCP port is created on
the same subnet.

Change-Id: I0e62027ae4d98944ef91a5d457d43d4224441b2f

9 years agoMerge "Stop admin using other tenants unshared rules"
Jenkins [Fri, 26 Sep 2014 23:02:22 +0000 (23:02 +0000)]
Merge "Stop admin using other tenants unshared rules"

9 years agoMerge "Fix to delete user and group association in Nuage Plugin"
Jenkins [Fri, 26 Sep 2014 17:25:33 +0000 (17:25 +0000)]
Merge "Fix to delete user and group association in Nuage Plugin"

9 years agoMerge "Fix entrypoint of OneConvergencePlugin plugin"
Jenkins [Thu, 25 Sep 2014 20:04:10 +0000 (20:04 +0000)]
Merge "Fix entrypoint of OneConvergencePlugin plugin"

9 years agoRevert "Cleanup floatingips also on router delete"
armando-migliaccio [Tue, 16 Sep 2014 01:40:08 +0000 (18:40 -0700)]
Revert "Cleanup floatingips also on router delete"

This reverts commit c3326996e38cb67f8d4ba3dabd829dc6f327b666.

The patch being reverted here addresses an issue that can no longer be
reproduced, in that under no circumstances, I can make the FIP lie around
before deleting a router (which can only be done after all FIP have been
disassociated or released).

Unless we have more clarity as to what the initial commit was really meant
to fix, there is a strong case for reverting this patch at this point.

Closes-bug: #1373100

Change-Id: I7e0f80e456ff4d9eb57a1d31c6ffc7cdfca5a163

9 years agoMerge "Security groups: prevent race for default security group creation"
Jenkins [Thu, 25 Sep 2014 14:36:25 +0000 (14:36 +0000)]
Merge "Security groups: prevent race for default security group creation"

9 years agoMerge "Deletes floating ip related connection states"
Jenkins [Thu, 25 Sep 2014 09:27:01 +0000 (09:27 +0000)]
Merge "Deletes floating ip related connection states"

9 years agoMerge "Fix 500 error on retrieving metadata by invalid URI"
Jenkins [Thu, 25 Sep 2014 04:58:13 +0000 (04:58 +0000)]
Merge "Fix 500 error on retrieving metadata by invalid URI"

9 years agoMerge "Fix KeyError when getting secgroup info for ports"
Jenkins [Thu, 25 Sep 2014 04:55:19 +0000 (04:55 +0000)]
Merge "Fix KeyError when getting secgroup info for ports"

9 years agoMerge "Forbid regular users to reset admin-only attrs to default values"
Jenkins [Thu, 25 Sep 2014 03:58:57 +0000 (03:58 +0000)]
Merge "Forbid regular users to reset admin-only attrs to default values"

10 years agoMerge "Add logging for enforced policy rules"
Jenkins [Wed, 24 Sep 2014 18:26:38 +0000 (18:26 +0000)]
Merge "Add logging for enforced policy rules"

10 years agoMerge "Do not lookup l3-agent for floating IP if host=None, dvr issue"
Jenkins [Wed, 24 Sep 2014 16:28:41 +0000 (16:28 +0000)]
Merge "Do not lookup l3-agent for floating IP if host=None, dvr issue"

10 years agoMerge "Supply missing cisco_cfg_agent.ini file"
Jenkins [Wed, 24 Sep 2014 16:07:23 +0000 (16:07 +0000)]
Merge "Supply missing cisco_cfg_agent.ini file"

10 years agoMerge "Remove RPC notification from transaction in create/update port"
Jenkins [Wed, 24 Sep 2014 14:42:05 +0000 (14:42 +0000)]
Merge "Remove RPC notification from transaction in create/update port"

10 years agoMerge "Imported Translations from Transifex"
Jenkins [Wed, 24 Sep 2014 11:24:52 +0000 (11:24 +0000)]
Merge "Imported Translations from Transifex"

10 years agoFix KeyError when getting secgroup info for ports
shihanzhang [Mon, 22 Sep 2014 09:28:06 +0000 (17:28 +0800)]
Fix KeyError when getting secgroup info for ports

The patch fixes a regression introduced with secgroup rpc refactor by
handling the case when security group contains rules for only IPv4 or
IPv6.

Change-Id: I02b174757bfc796a81cdb482c55ba7f9e954131d
Closes-bug: #1372337

10 years agoMerge "Remove the translation tag for debug level logs in vmware plugin"
Jenkins [Wed, 24 Sep 2014 08:52:25 +0000 (08:52 +0000)]
Merge "Remove the translation tag for debug level logs in vmware plugin"

10 years agoMerge "Finish small unit test refactor of API v2 tests"
Jenkins [Wed, 24 Sep 2014 06:54:18 +0000 (06:54 +0000)]
Merge "Finish small unit test refactor of API v2 tests"

10 years agoMerge "Delete DB records instead of tables to speedup UT"
Jenkins [Tue, 23 Sep 2014 22:47:40 +0000 (22:47 +0000)]
Merge "Delete DB records instead of tables to speedup UT"

10 years agoDeletes floating ip related connection states
Yong Sheng Gong [Mon, 30 Jun 2014 07:01:17 +0000 (15:01 +0800)]
Deletes floating ip related connection states

When a floating ip is dissociated with a port, the current
connection with the floating ip is still working. This patch
will clear the connection state and cut off the connection
immediately.

Since conntrack -D will return 1, which is not an error code,
so add extra_ok_codes argument to execute methods.

Change-Id: Ia9bd7ae243a0859dcb97e2fa939f7d16f9c2456c
Closes-Bug: 1334926

10 years agoDo not lookup l3-agent for floating IP if host=None, dvr issue
Brian Haley [Thu, 18 Sep 2014 01:48:53 +0000 (21:48 -0400)]
Do not lookup l3-agent for floating IP if host=None, dvr issue

If a floating IP has been associated with a port, but the port
has not been associated with an instance, attempting to lookup
the l3-agent hosting it will cause an AgentNotFoundByTypeHost
exception.  Just skip it and go onto the next one.

Change-Id: If3df9770fa9e2d2eada932ee5f243d3458bf7261
Closes-Bug: #1370795

10 years agoRemove RPC notification from transaction in create/update port
Carl Baldwin [Fri, 19 Sep 2014 17:37:17 +0000 (17:37 +0000)]
Remove RPC notification from transaction in create/update port

Removing notifications to the L3 agent from within the transaction in
create_port and update_port eliminates many lock wait timeouts in the
dvr check queue job and in scale testing locally.

Since this patch leaves context unused in _process_port_binding, the
argument is removed from the method.

Closes-Bug: #1371732

Change-Id: Ibd86611ad3e7eff085d769bdff777a5870f30c58

10 years agoDo not assume order of body and tags elements
Jacek Swiderski [Wed, 6 Aug 2014 09:23:16 +0000 (11:23 +0200)]
Do not assume order of body and tags elements

This fixes the l2gateway unit test that breaks with a randomized PYTHONHASHSEED
(see the bug report).

The test assumed that the body dict from self._create_expected_req_body
had elements (including contents of tags list) in a particular order.
Found with PYTHONHASHSEED=2455351445.
The fix ensures that body is in predictable order.

Partial-bug: #1348818
Note: There are several other unrelated unit tests that also break with a
randomized PYTHONHASHSEED, but they are not addressed here. They will be
addressed in separate patches.

Change-Id: I423b68aff58486c113d0e5c5f4726f9eabf6920e

10 years agoRemove the translation tag for debug level logs in vmware plugin
Steven Ren [Tue, 23 Sep 2014 09:58:34 +0000 (02:58 -0700)]
Remove the translation tag for debug level logs in vmware plugin

There is no need to translate the debug level logs in vmware plugin for neutron.

Closes-bug: #1372862

Change-Id: If07c06cc3a1eb3dd147191bb8ab9198d4198cd69

10 years agoMerge "Use dict_extend_functions to populate provider network attributes"
Jenkins [Tue, 23 Sep 2014 13:18:43 +0000 (13:18 +0000)]
Merge "Use dict_extend_functions to populate provider network attributes"

10 years agoFix entrypoint of OneConvergencePlugin plugin
Ann Kamyshnikova [Tue, 23 Sep 2014 08:15:05 +0000 (12:15 +0400)]
Fix entrypoint of OneConvergencePlugin plugin

In setup.cfg entrypoint of OneConvergencePlugin is set incorrectly.
Used '.' instead of ':'.

Closes-bug: #1372810

Change-Id: Ic1e154cfcf8b13f021b0635238e07a0459a25a9e

10 years agoForbid regular users to reset admin-only attrs to default values
Elena Ezhova [Tue, 19 Aug 2014 11:54:36 +0000 (15:54 +0400)]
Forbid regular users to reset admin-only attrs to default values

A regular user can reset an admin-only attribute to its default
value due to the fact that a corresponding policy rule is
enforced only in the case when an attribute is present in the
target AND has a non-default value.

Added a new attribute "attributes_to_update" which contains a list
of all to-be updated attributes to the body of the target that is
passed to policy.enforce.

Changed a check for whether an attribute is explicitly set.
Now, in the case of update, the function should not pay attention
to a default value of an attribute, but check whether it was
explicitly marked as being updated.

Added unit-tests.

Closes-Bug: #1357379
Related-Bug: #1338880
Change-Id: I6537bb1da5ef0d6899bc71e4e949f2c760c103c2

10 years agoMerge "Mock out all RPC calls with a fixture"
Jenkins [Tue, 23 Sep 2014 09:51:36 +0000 (09:51 +0000)]
Merge "Mock out all RPC calls with a fixture"

10 years agoFinish small unit test refactor of API v2 tests
Kevin Benton [Thu, 11 Sep 2014 11:26:03 +0000 (04:26 -0700)]
Finish small unit test refactor of API v2 tests

Leverage a utility function for all of the tests
that create something in the API and expect a failure.

Change-Id: Iedb6ba35d637dda5ae9f553d0c7ffcb7c526f3c6

10 years agoSecurity groups: prevent race for default security group creation
Gary Kotton [Mon, 22 Sep 2014 17:03:37 +0000 (10:03 -0700)]
Security groups: prevent race for default security group creation

When a VM is booted via the Nova the client connection is created
with an admin user. This causes problems when creating the neutron
port. That is, there may be a race for the creation of the default
security group for the tenant.
The problem was introduced by commit acf44dba26ca8dca47bfb5fb2916807f9f4e2060

Change-Id: Ie0199c71231a322704f1f49995facde09c92da25
Closes-bug: #1372570

10 years agoMerge "Added TAP_DEVICE_PREFIX info to common/constants"
Jenkins [Tue, 23 Sep 2014 08:01:24 +0000 (08:01 +0000)]
Merge "Added TAP_DEVICE_PREFIX info to common/constants"

10 years agoStop admin using other tenants unshared rules
Preeti Mirji [Wed, 23 Jul 2014 10:22:30 +0000 (03:22 -0700)]
Stop admin using other tenants unshared rules

If the firewall rules are not shared and if they belong to different
tenants, then admin should not be able to create a policy using
these rules and he should not be able to insert such rules into
policies. An exception should be raised in such case. Added new
exception “FirewallRuleConflict” to handle such conditions.

Co-Authored-By: Koteswara Rao Kelam<koteswara.kelam@hp.com>
Change-Id: I984eb76069bd1493a77bf523bec2bd81abb14abb
Closes-bug: 1327057

10 years agoMerge "DVR to delete router namespaces for service ports"
Jenkins [Mon, 22 Sep 2014 23:13:54 +0000 (23:13 +0000)]
Merge "DVR to delete router namespaces for service ports"

10 years agoMerge "Rework and enable VPNaaS UT for Cisco CSR REST"
Jenkins [Mon, 22 Sep 2014 22:47:32 +0000 (22:47 +0000)]
Merge "Rework and enable VPNaaS UT for Cisco CSR REST"

10 years agoEliminate OrderedDict from test_api_v2.py
Kevin L. Mitchell [Mon, 22 Sep 2014 17:18:11 +0000 (12:18 -0500)]
Eliminate OrderedDict from test_api_v2.py

Neutron cannot possibly be passing tests under Python 2.6, as
neutron/tests/unit/test_api_v2.py is referencing
collections.OrderedDict, which does not exist in Python 2.6.
Since there is no reason to use an OrderedDict in this case,
this replaces it with a simple dict.

Change-Id: I1b9886f508c4c8b96cf50c50f157c1960da433fc
Closes-Bug: #1372571

10 years agoMerge "Remove unnecessary _make_port function in BSN UTs"
Jenkins [Mon, 22 Sep 2014 14:46:33 +0000 (14:46 +0000)]
Merge "Remove unnecessary _make_port function in BSN UTs"

10 years agoMerge "Do not assume order of device_ids set elements"
Jenkins [Mon, 22 Sep 2014 14:46:04 +0000 (14:46 +0000)]
Merge "Do not assume order of device_ids set elements"

10 years agoMock out all RPC calls with a fixture
Kevin Benton [Sat, 20 Sep 2014 17:48:22 +0000 (10:48 -0700)]
Mock out all RPC calls with a fixture

Mock out the rpc proxy calls used by various agents to
prevent unit tests from blocking for 10+ seconds while waiting
for a timeout. This happened with the OVS agent unit tests
recently in Change-ID Idd770a85a9eabff112d9613e75d8bb524020234a.

This change results in a reduction from 330.8 seconds to 2.7 seconds
for the neutron.tests.unit.openvswitch.test_ovs_neutron_agent
test module.

Closes-Bug: #1372076
Change-Id: I5e6794dc33c64c8fe309d8e72a8af3385c7d4442

10 years agoAdd logging for enforced policy rules
Elena Ezhova [Tue, 26 Aug 2014 15:22:20 +0000 (19:22 +0400)]
Add logging for enforced policy rules

There are a lot of policy rules which should not necessarily
be explicitly specified in policy.json to be checked while enforcement.
There should be a way for an operator to know which policy rules are
actually being enforced for each action.

Added a unit test.

Change-Id: I261d3e230eced9ea514b35cc3f5f8be04f84c751
Closes-Bug: #1356679

10 years agoImported Translations from Transifex
OpenStack Proposal Bot [Mon, 22 Sep 2014 06:07:23 +0000 (06:07 +0000)]
Imported Translations from Transifex

Change-Id: If3c928da9856fae84b139c78ee04573daf562a95

10 years agoRemove unnecessary _make_port function in BSN UTs
Kevin Benton [Thu, 18 Sep 2014 11:21:05 +0000 (04:21 -0700)]
Remove unnecessary _make_port function in BSN UTs

The Big Switch unit tests had unnecessary copies of the
_make_port function to allow the binding:host_id field to
be set. This was already possible with the existing _make_port
call through the use of kwargs so the extra function wasn't
necessary.

Change-Id: I88679173117739f628ae289636b5cdea10417e6c

10 years agoMerge "Some clean up of code I'm preparing to modify"
Jenkins [Sun, 21 Sep 2014 07:47:09 +0000 (07:47 +0000)]
Merge "Some clean up of code I'm preparing to modify"

10 years agoMerge "Only setup dhcp interface if dhcp is not active on network"
Jenkins [Sun, 21 Sep 2014 00:21:03 +0000 (00:21 +0000)]
Merge "Only setup dhcp interface if dhcp is not active on network"

10 years agoMerge "Fix foreign key constraint error on ml2_dvr_port_bindings"
Jenkins [Sun, 21 Sep 2014 00:20:48 +0000 (00:20 +0000)]
Merge "Fix foreign key constraint error on ml2_dvr_port_bindings"

10 years agoMerge "Delete a broken subnet delete unit test"
Jenkins [Sun, 21 Sep 2014 00:20:33 +0000 (00:20 +0000)]
Merge "Delete a broken subnet delete unit test"

10 years agoMerge "HA routers master state now distributed amongst agents"
Jenkins [Sat, 20 Sep 2014 05:48:39 +0000 (05:48 +0000)]
Merge "HA routers master state now distributed amongst agents"

10 years agoMerge "Deletes FIP agent gw port when last VM is deleted"
Jenkins [Sat, 20 Sep 2014 04:04:42 +0000 (04:04 +0000)]
Merge "Deletes FIP agent gw port when last VM is deleted"

10 years agoMerge "Separate Configuration from Freescale SDN ML2 mechanism Driver"
Jenkins [Sat, 20 Sep 2014 04:04:27 +0000 (04:04 +0000)]
Merge "Separate Configuration from Freescale SDN ML2 mechanism Driver"

10 years agoMerge "Indicate the begin and end of the sync process to EOS"
Jenkins [Fri, 19 Sep 2014 21:55:25 +0000 (21:55 +0000)]
Merge "Indicate the begin and end of the sync process to EOS"

10 years agoUse dict_extend_functions to populate provider network attributes
Divya ChanneGowda [Wed, 3 Sep 2014 21:59:34 +0000 (14:59 -0700)]
Use dict_extend_functions to populate provider network attributes

Use dict_extend_functions mechanism to handle populating additional
provider network attributes into Network model in Nuage plugin.

Change-Id: I72e5afe3d03ae223fcd8e75f1f4f07624c3a7daf
Closes-Bug: #1362308

10 years agoFix foreign key constraint error on ml2_dvr_port_bindings
armando-migliaccio [Fri, 19 Sep 2014 19:11:11 +0000 (12:11 -0700)]
Fix foreign key constraint error on ml2_dvr_port_bindings

Get the port before creating the DVR binding. This should guarantee that, if
the port is found, no foreign key violation is triggered.

Closes-bug: #1371696

Change-Id: I90c3d6460c14ef27823be95bc26aae38eba4879a

10 years agoSome clean up of code I'm preparing to modify
rossella [Tue, 16 Sep 2014 22:30:03 +0000 (22:30 +0000)]
Some clean up of code I'm preparing to modify

This patch has a few benign changes that should be easily reviewed.
The purpose of this patch is to allow me to make cleaner edits in
follow on patches so that they're more easily reviewed in their
specific contexts.

Change-Id: Ia3dd49c7b39f9ca07d5bb117972d934813c0cd67

10 years agoMerge "Use call to report state when ovs_agent starts up"
Jenkins [Fri, 19 Sep 2014 11:02:09 +0000 (11:02 +0000)]
Merge "Use call to report state when ovs_agent starts up"

10 years agoMerge "Access correct key for template name"
Jenkins [Fri, 19 Sep 2014 09:14:45 +0000 (09:14 +0000)]
Merge "Access correct key for template name"

10 years agoIndicate the begin and end of the sync process to EOS
Sukhdev [Fri, 19 Sep 2014 00:15:10 +0000 (17:15 -0700)]
Indicate the begin and end of the sync process to EOS

Send a trigger to EOS when a sync operation is initiated, and,
another trigger when the sync operation is complete.
Additionally, sync_interval value (from ml2_conf_arista.ini)
is passed down to EOS. This is used by EOS to timeout the
transaction.

Change-Id: I5110b24380ad848d03719e94283d69a7bc0ce972
Closes-Bug: 1371324

10 years agoDVR to delete router namespaces for service ports
Vivekanandan Narasimhan [Wed, 3 Sep 2014 08:48:39 +0000 (01:48 -0700)]
DVR to delete router namespaces for service ports

Earlier merge that enabled LBaaS in DVR with review #114141
had not covered the removal of DVR router namespace on
VIP Port deletion in ml2 plugin.

Here we fix the ml2 plugin to attempt namespace removal for
all dvr serviced ports.

Change-Id: Ie7930ebedb12212886d45294132fefff7296e104
Closes-Bug: #1364839

10 years agoDo not assume order of device_ids set elements
Bradley Jones [Wed, 6 Aug 2014 13:16:23 +0000 (14:16 +0100)]
Do not assume order of device_ids set elements

This fixes the test_ancillary_bridges_multiple unit test that breaks with a randomized
PYTHONHASHSEED (see the bug report).
The test assumed that the device_ids set had
elements in a particular order. Found with PYTHONHASHSEED=2455351445.

The fix refactors the pullup_side_effect function so that it checks if the
device_id exists before returning the bridge.

Partial-bug: #1348818

Note: There are several other unrelated unit tests that also break with a
randomized PYTHONHASHSEED, but they are not addressed here. They will be
addressed in separate patches.

Change-Id: Ie6b44d1d820ebb186036ffcd04ea2104dd384e94

10 years agoMerge "Check for ports in subnet before deleting it from Nuage VSD"
Jenkins [Thu, 18 Sep 2014 22:53:10 +0000 (22:53 +0000)]
Merge "Check for ports in subnet before deleting it from Nuage VSD"

10 years agoFix 500 error on retrieving metadata by invalid URI
armando-migliaccio [Thu, 18 Sep 2014 18:00:12 +0000 (11:00 -0700)]
Fix 500 error on retrieving metadata by invalid URI

An invalid URI should return a BadRequest error rather
than making the metadata proxy bomb out.

Closes-bug: #1371160

Change-Id: Ifb495f9e8929062a0c24d090c3e702109a38803a

10 years agoOnly setup dhcp interface if dhcp is not active on network
Oleg Bondarev [Thu, 18 Sep 2014 14:39:43 +0000 (18:39 +0400)]
Only setup dhcp interface if dhcp is not active on network

When enabling (DhcpLocalProcess.enable()) dhcp for a network the agent
first sets dhcp interface, then checks if dhcp is curently active and
if it's true then the agent restarts dhcp.
Restart (DhcpBase.restart()) first disables dhcp and then enables it again
by calling DhcpLocalProcess.enable() recursively which in turn sets
dhcp interface again (it doesn't see the port created earlier as network
is not re-fetched from db). This leads to duplicate dhcp interface
for the network.

The fix is to only setup dhcp interface if dhcp is not active.

Closes-Bug: #1339968

Change-Id: I3a6d2fd5b18a97138ac5b699ecd4d4b30dbdbacb

10 years agoHA routers master state now distributed amongst agents
Assaf Muller [Mon, 15 Sep 2014 15:11:17 +0000 (18:11 +0300)]
HA routers master state now distributed amongst agents

We're currently running with no pre-emption, meaning that
the first router in a cluster to go up will be the master,
regardless of priority. Since the order in which we sent
notifications was constant, the same agent hosted the
master instances of all HA routers, defeating the idea
of load sharing.

Closes-Bug: #1365429
Change-Id: Ia6fe2bd0317c241bf7eb55915df7650dfdc68210

10 years agoRework and enable VPNaaS UT for Cisco CSR REST
Paul Michali [Tue, 16 Sep 2014 15:22:17 +0000 (11:22 -0400)]
Rework and enable VPNaaS UT for Cisco CSR REST

The Cisco CSR REST client library unit tests were developed in
Icehouse, using the httmock library. However, the community did
not want to add this library to global requirements, as there was
a similar httpretty library available (albeit with some short-
comings). As a result, the test module was renamed with a "no"
prefix, to prevent inclusion in automated tests.

Since then, a new library, requests-mock, has been added to global
requirements, to replace httpretty, and is being used on several
other projects.

This commit reworks the unit test to use requests-mock, instead of
httmock. The functionality is the same, but the mechanism (a
fixture with URI registration vs context manager) is different.

This commit provides coverage for the REST client code, by using a
mock for the Cisco CSR VM. The unit test module can be subclassed,
and used with a real CSR VM, for 3rd party CI testing, in the
future.

Change-Id: I55c8a253eb32985bc2016ae748b1ded58d021e1a
Closes-Bug: 1358470

10 years agoMerge "Update URL of Ryu official site in ofagent README files"
Jenkins [Thu, 18 Sep 2014 08:14:57 +0000 (08:14 +0000)]
Merge "Update URL of Ryu official site in ofagent README files"

10 years agoMerge "NSX plugin: set VNIC_TYPE port binding attribute"
Jenkins [Thu, 18 Sep 2014 07:26:52 +0000 (07:26 +0000)]
Merge "NSX plugin: set VNIC_TYPE port binding attribute"

10 years agoMerge "Add endpoint_type parameter to MetaInterfaceDriver"
Jenkins [Thu, 18 Sep 2014 07:25:26 +0000 (07:25 +0000)]
Merge "Add endpoint_type parameter to MetaInterfaceDriver"

10 years agoUpdate URL of Ryu official site in ofagent README files
YAMAMOTO Takashi [Fri, 5 Sep 2014 06:03:09 +0000 (15:03 +0900)]
Update URL of Ryu official site in ofagent README files

Change-Id: I1e9bdc3dffb8be705c0fcaf88bd914d27e10936d

10 years agoSet dsvm-functional job to use system packages
Maru Newby [Wed, 17 Sep 2014 19:48:41 +0000 (19:48 +0000)]
Set dsvm-functional job to use system packages

The functional job was breaking due to the interaction between
devstack installing neutron system-wide in editable mode (pip install
-e) and tox packaging in the same path.  Installing in editable
mode meant that neutron.egg-info/PKG_INFO could be updated (in this
case by tox) to change the installed version of the neutron package
without updating scripts that depended on the installed version
(e.g. rootwrap).  This fix is to set the dsvm-functional env to
use system packages and avoid having tox update PKG_INFO.

Change-Id: Icc38cacd69bc5843ccfcc60237a7102df6d8597f
Closes-bug: #1370347

10 years agoDelete a broken subnet delete unit test
Kevin Benton [Thu, 18 Sep 2014 20:46:51 +0000 (13:46 -0700)]
Delete a broken subnet delete unit test

A test to delete a subnet in use was incorrectly
calling 'subnet' instead of 'subnets' in the API request
and asserting a 404 instead of a 409. Even the correct
version of this test is already covered by the
'test_port_prevents_subnet_deletion' method so this
commit just removes the broken test.

Change-Id: I3eac35abbb1d6f8429b4331948aecfc952284219

10 years agoFix to delete user and group association in Nuage Plugin
Chirag Shahani [Wed, 10 Sep 2014 22:47:48 +0000 (15:47 -0700)]
Fix to delete user and group association in Nuage Plugin

After a router delete operation, the attached zone to that
router is also deleted. Got rid of code that tried to do
a get operation on the nuage_zone after router delete
operation.
Closes-Bug: #1367864

Change-Id: I01753a472200a961cdcecee703616fd3239abd3c

10 years agoDeletes FIP agent gw port when last VM is deleted
Swaminathan Vasudevan [Thu, 11 Sep 2014 19:51:14 +0000 (12:51 -0700)]
Deletes FIP agent gw port when last VM is deleted

This patch deletes the FIP agent gateway port in
the plugin, when the last VM with FIP using this
FIP agent gw port on a Compute node gets deleted.

Closes-bug: #1367588

Change-Id: I71a9fa48544fa4bbd08ac6d83c99e6542c818009

10 years agoDelete DB records instead of tables to speedup UT
Kevin Benton [Wed, 17 Sep 2014 00:29:51 +0000 (17:29 -0700)]
Delete DB records instead of tables to speedup UT

Now that the schema is fixed for all of the plugins,
there isn't a need to delete and recreate the entire
schema for every unit test.

This patch clears the tables at the end of each test
instead of deleting them. This eliminated overhead seems
to save 10%+ execution time of the entire set of unit
tests.

Example of performance gain from tox -epy27 tests.unit.ml2:
Before: Ran 2495 tests in 284.186s
After: Ran 2495 tests in 223.299s

Change-Id: Ic5bcbb0cf941e0745890abc776d719e58bb42e35

10 years agoSeparate Configuration from Freescale SDN ML2 mechanism Driver
Trinath Somanchi [Wed, 17 Sep 2014 07:22:14 +0000 (12:52 +0530)]
Separate Configuration from Freescale SDN ML2 mechanism Driver

- In the current implementation, CRD configuration is existing
  within the code of ML2 mechanism driver.

- When any other plugin/driver (like, Freescale FWaaS Plugin) need
  to use this configuration, it needs to duplicate the complete configuration.

- So the CRD configuration is moved to a separate file for use
  in other plugin/drivers.

- Unit testing of this MD is also updated.

Closes-Bug: #1368033

Change-Id: I488fee47803a494aae9df42f9c59fffa9843e727

10 years agoNSX plugin: set VNIC_TYPE port binding attribute
Salvatore [Tue, 16 Sep 2014 15:28:55 +0000 (17:28 +0200)]
NSX plugin: set VNIC_TYPE port binding attribute

A recent change has made this attribute required for nova
integration.
This patch adds this attribute to responses generated by the NSX
plugin, and also ensures relevant unit tests are executed for the
vmware NSX plugin.

Change-Id: Ieebab01b406909f66a40cc683763292a9ef6f218
Closes-Bug: #1370112

10 years agoMerge "Remove @author(s) from copyright statements"
Jenkins [Tue, 16 Sep 2014 13:30:38 +0000 (13:30 +0000)]
Merge "Remove @author(s) from copyright statements"

10 years agoMerge "Fix DVR to service DHCP Ports"
Jenkins [Tue, 16 Sep 2014 13:26:05 +0000 (13:26 +0000)]
Merge "Fix DVR to service DHCP Ports"

10 years agoMerge "Fail on None before iteration attempt"
Jenkins [Tue, 16 Sep 2014 12:17:25 +0000 (12:17 +0000)]
Merge "Fail on None before iteration attempt"

10 years agoAccess correct key for template name
Paul Michali [Fri, 12 Sep 2014 18:16:35 +0000 (14:16 -0400)]
Access correct key for template name

When an exception occurs while loading the config agent driver, the
handler tries to log a message, but accesses the wrong key to get the
template name. This causes another exception, which masks the original
exception.

This change accesses the correct key and performs logging inside a
with block to (defensively) preserve the exception context.

Change-Id: I3991bc4c509bbd8d68f7a1c8c8314404f2e0eafa
Closes-Bug: #1368900

10 years agoMerge "Allow DHCPv6 reply from server to client"
Jenkins [Tue, 16 Sep 2014 07:52:52 +0000 (07:52 +0000)]
Merge "Allow DHCPv6 reply from server to client"

10 years agoMerge "Avoid an extra database query in schedule_snat_router"
Jenkins [Tue, 16 Sep 2014 06:42:21 +0000 (06:42 +0000)]
Merge "Avoid an extra database query in schedule_snat_router"

10 years agoMerge "Tunnel ID range validation for VXLAN/GRE networks"
Jenkins [Tue, 16 Sep 2014 00:39:53 +0000 (00:39 +0000)]
Merge "Tunnel ID range validation for VXLAN/GRE networks"

10 years agoRename workers to api_workers and simplify code
Carl Baldwin [Tue, 11 Feb 2014 00:58:42 +0000 (00:58 +0000)]
Rename workers to api_workers and simplify code

Refactor a few ugly aspects of the multiple API worker patch to make
way for multiple rpc workers.  This came up as I was trying to add
multiple RPC workers using similar patterns and remembering that some
things were left in a rather awkward state.

Change-Id: I549db67af4af6a2df80e12cf233109dda5213c47

10 years agoFix DVR to service DHCP Ports
Vivekanandan Narasimhan [Wed, 27 Aug 2014 09:07:37 +0000 (02:07 -0700)]
Fix DVR to service DHCP Ports

This fix ensures that DHCP Ports that are
available on DVR routed subnets, are serviced
by DVR neutron infrastructure.

Here servicing by DVR means, creation of
DVR namespaces on such nodes holding DHCP
Ports and also applying DVR specific OVS
Rules to the br-int and br-tun bridges on
such nodes, to enable traffic to be routed
via DVR to such DHCP Ports.

Closes-Bug: #1358718

Change-Id: Ib6d5fbf883d6698f34f3a3b722e426e3285a5736

10 years agoMerge "use TRUE in SQL for boolean var"
Jenkins [Mon, 15 Sep 2014 17:32:36 +0000 (17:32 +0000)]
Merge "use TRUE in SQL for boolean var"

10 years agoMerge "Imported Translations from Transifex"
Jenkins [Mon, 15 Sep 2014 17:23:40 +0000 (17:23 +0000)]
Merge "Imported Translations from Transifex"

10 years agoMerge "Remove faulty .assert_has_calls([])"
Jenkins [Mon, 15 Sep 2014 16:53:20 +0000 (16:53 +0000)]
Merge "Remove faulty .assert_has_calls([])"

10 years agoTunnel ID range validation for VXLAN/GRE networks
yangxurong [Thu, 24 Apr 2014 01:26:22 +0000 (09:26 +0800)]
Tunnel ID range validation for VXLAN/GRE networks

Currently, there is no check which validates the values of
tunnel range for VXLAN/GRE networks. The VXLAN VNI is 24 bit
which have range between 1 to 2^24 - 1. Similarly, GRE key field
is 32 bit which have range between 1 to 2^32 - 1.

Closes-Bug: #1306488

Co-Authored-By: romilg romilg@hp.com
Change-Id: Idb3d0f41166df589a1e90394d9319901b5f9b439

10 years agoMerge "shared policy shouldn't have unshared rules"
Jenkins [Mon, 15 Sep 2014 15:09:33 +0000 (15:09 +0000)]
Merge "shared policy shouldn't have unshared rules"

10 years agoMerge "Add unit-test assert to check dict is superset of dict"
Jenkins [Mon, 15 Sep 2014 14:33:01 +0000 (14:33 +0000)]
Merge "Add unit-test assert to check dict is superset of dict"