]> review.fuel-infra Code Review - openstack-build/neutron-build.git/log
openstack-build/neutron-build.git
9 years agoAllow plugin to specify router_id
Aaron Rosen [Wed, 4 Mar 2015 21:34:26 +0000 (13:34 -0800)]
Allow plugin to specify router_id

It is useful to allow the backend to specify the uuid that we want neutron to
use. We currently do this same thing for networks. This patch enables the same
behavior for routers as well.

Change-Id: If675dfd2997217886976301270ef5f773ffa7a13

9 years agoMerge "Fix incorrect query for user ip allocations"
Jenkins [Fri, 24 Apr 2015 04:38:08 +0000 (04:38 +0000)]
Merge "Fix incorrect query for user ip allocations"

9 years agoMerge "Fix L3 agent functional tests random failures"
Jenkins [Fri, 24 Apr 2015 01:16:40 +0000 (01:16 +0000)]
Merge "Fix L3 agent functional tests random failures"

9 years agoMerge "Add block name to switch config options for MLX plug-ins."
Jenkins [Fri, 24 Apr 2015 01:09:06 +0000 (01:09 +0000)]
Merge "Add block name to switch config options for MLX plug-ins."

9 years agoFix L3 agent functional tests random failures
Assaf Muller [Thu, 23 Apr 2015 17:43:29 +0000 (13:43 -0400)]
Fix L3 agent functional tests random failures

The test_ha_router_failover tests were not being unmocked. This
is because the same object was being mocked twice, but unmocked
once. The mock.patch.stopall call in the tests base class was rewinding
the value of the object from the second mock to the first mock.

Follow up tests in the same worker were using namespace
names defined via the first mock in the failover test.

Closes-Bug: #1446261
Change-Id: I8f24b8bb3a6a501dbe210c2cc67c47fa4b76257c

9 years agoMerge "Refactor RESOURCE_ATTRIBUTE_MAP cleanup"
Jenkins [Thu, 23 Apr 2015 18:00:13 +0000 (18:00 +0000)]
Merge "Refactor RESOURCE_ATTRIBUTE_MAP cleanup"

9 years agoMerge "Log RPC initialization in L3 service plugin and ML2"
Jenkins [Thu, 23 Apr 2015 17:47:39 +0000 (17:47 +0000)]
Merge "Log RPC initialization in L3 service plugin and ML2"

9 years agoMerge "Change callbacks logging from INFO to DEBUG"
Jenkins [Thu, 23 Apr 2015 17:45:35 +0000 (17:45 +0000)]
Merge "Change callbacks logging from INFO to DEBUG"

9 years agoMerge "Fix DVR functional tests resources leak"
Jenkins [Thu, 23 Apr 2015 17:42:56 +0000 (17:42 +0000)]
Merge "Fix DVR functional tests resources leak"

9 years agoMerge "Simplify keepalived.virtual_routes"
Jenkins [Thu, 23 Apr 2015 17:39:27 +0000 (17:39 +0000)]
Merge "Simplify keepalived.virtual_routes"

9 years agoMerge "Add security groups events"
Jenkins [Thu, 23 Apr 2015 14:08:25 +0000 (14:08 +0000)]
Merge "Add security groups events"

9 years agoMerge "L3 DB: Defer port DB subnet lookups"
Jenkins [Thu, 23 Apr 2015 09:52:30 +0000 (09:52 +0000)]
Merge "L3 DB: Defer port DB subnet lookups"

9 years agoMerge "Remove dependency on weak reference for registry callbacks"
Jenkins [Thu, 23 Apr 2015 08:01:44 +0000 (08:01 +0000)]
Merge "Remove dependency on weak reference for registry callbacks"

9 years agoMerge "Ensure metadata network works with DVR"
Jenkins [Thu, 23 Apr 2015 07:43:44 +0000 (07:43 +0000)]
Merge "Ensure metadata network works with DVR"

9 years agoMerge "Restrict subnet create/update to avoid DHCP resync"
Jenkins [Thu, 23 Apr 2015 05:18:19 +0000 (05:18 +0000)]
Merge "Restrict subnet create/update to avoid DHCP resync"

9 years agoMerge "Only update MTU in update code for MTU"
Jenkins [Thu, 23 Apr 2015 04:11:52 +0000 (04:11 +0000)]
Merge "Only update MTU in update code for MTU"

9 years agoMerge "tests: confirm that _output_hosts_file does not log too often"
Jenkins [Thu, 23 Apr 2015 03:52:05 +0000 (03:52 +0000)]
Merge "tests: confirm that _output_hosts_file does not log too often"

9 years agoRestrict subnet create/update to avoid DHCP resync
watanabe.isao [Wed, 15 Apr 2015 06:48:08 +0000 (15:48 +0900)]
Restrict subnet create/update to avoid DHCP resync

As we know, IPs in subnet CIDR are used for
1) Broadcast port
2) Gateway port
3) DHCP port if enable_dhcp is True, or update to True
4) Others go into allocation_pools
Above 1) to 3) are created by default, which means if CIDR doesn't
have that much of IPs, subnet create/update will cause a DHCP resync.

This fix is to add some restricts to the issue:
A) When subnet create, if enable_dhcp is True, /31 and /32
   cidrs are forbidden for IPv4 subnets while /127 and /128 cidrs are
   forbidden for IPv6 subnets.
B) When subnet update, if enable_dhcp is changing to True and there are no
   more IPs in allocation_pools, the request should be denied.

Change-Id: I2e4a4d5841b9ad908f02b7d0795cba07596c023d
Co-authored-by: Andrew Boik <dboik@cisco.com>
Closes-Bug: #1443798

9 years agoRemove dependency on weak reference for registry callbacks
armando-migliaccio [Tue, 21 Apr 2015 23:47:09 +0000 (16:47 -0700)]
Remove dependency on weak reference for registry callbacks

The use of weakref was introduced as a preventive measure to avoid
potential OOM kills, however that limited our ability to employ
certain functions as callbacks, such as object methods (see [1] for
an example).

Since the adoption of the callback registry, it has been observed that
callbacks are generally long lived (for the entire duration of the
process they belong to), therefore this limitation appears to be too
restrictive at this point in time.

Some might argue that it's better safe than sorry, but until we
have some evidence of actual OOM kills, it's probably best to take
the bolder action of removing the adoption of weak references and
deal with the potential fallout, should it happen.

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

Change-Id: Idcd0286fc4235af82901c8a17ea45bc758b62b37

9 years agoEnsure metadata network works with DVR
Salvatore Orlando [Wed, 22 Apr 2015 20:27:53 +0000 (13:27 -0700)]
Ensure metadata network works with DVR

As DVR routers use a different type of interface, this patch
amends the DHCP agent code ensuring that a metadata proxy is
spawned when the metadata network feature is enabled on the
DHCP agent.

Change-Id: Id7f2e891c0753620a604cf6160c6b592db1aa284
Closes-Bug: #1447344

9 years agoMerge "ovs_neutron_agent: Remove a redundant assignment of ovs_status"
Jenkins [Wed, 22 Apr 2015 20:37:51 +0000 (20:37 +0000)]
Merge "ovs_neutron_agent: Remove a redundant assignment of ovs_status"

9 years agoMerge "Added note about removing bridge from mappings"
Jenkins [Wed, 22 Apr 2015 20:35:53 +0000 (20:35 +0000)]
Merge "Added note about removing bridge from mappings"

9 years agoMerge "Defer creation of router JSON in get_routers RPC"
Jenkins [Wed, 22 Apr 2015 19:29:09 +0000 (19:29 +0000)]
Merge "Defer creation of router JSON in get_routers RPC"

9 years agoMerge "Handle no ofport in get_vif_port_to_ofport_map"
Jenkins [Wed, 22 Apr 2015 19:28:56 +0000 (19:28 +0000)]
Merge "Handle no ofport in get_vif_port_to_ofport_map"

9 years agoChange callbacks logging from INFO to DEBUG
Assaf Muller [Wed, 22 Apr 2015 16:12:47 +0000 (12:12 -0400)]
Change callbacks logging from INFO to DEBUG

This is an internal implementation detail, would admins care
if internal events are being fired off successfully? What actionable
information does this present?

Change-Id: I81418c1ff529b5a8ffe60513d91f51d134a45f26

9 years agoFix DVR functional tests resources leak
Assaf Muller [Mon, 20 Apr 2015 15:53:41 +0000 (11:53 -0400)]
Fix DVR functional tests resources leak

Change-Id: I882bd9127a61de7e016abfca53d22b01cbf57835
Closes-Bug: #1446288

9 years agoRefactor RESOURCE_ATTRIBUTE_MAP cleanup
Brent Eagles [Tue, 17 Feb 2015 17:15:25 +0000 (13:45 -0330)]
Refactor RESOURCE_ATTRIBUTE_MAP cleanup

This patch adds a AttributeMapMemento class that can be used for
restoring the RESOURCE_ATTRIBUTE_MAP on test tear down. Tests containing
their own cleanup code have been modified to use it instead.

Change-Id: I7ce5182bdfb8f541741a327feada63a29ddac2ae

9 years agoFix incorrect query for user ip allocations
Eugene Nikanorov [Sat, 18 Apr 2015 11:31:44 +0000 (15:31 +0400)]
Fix incorrect query for user ip allocations

Previously the query was fetching an IPAllocation object incorrectly
relying on the fact that it has port attribute that should be
join-loaded when it really is not.

Incorrect query produced by previous code:
SELECT ipallocations.port_id AS ipallocations_port_id,
       ipallocations.ip_address AS ipallocations_ip_address,
       ipallocations.subnet_id AS ipallocations_subnet_id,
       ipallocations.network_id AS ipallocations_network_id
FROM ipallocations, ports
WHERE ipallocations.subnet_id = :subnet_id_1
      AND ports.device_owner NOT IN (:device_owner_1)

The query then may have produced results that don't satisfy
the condition intended by the code.

Query produced by the fixed code:
SELECT ipallocations.port_id AS ipallocations_port_id,
       ipallocations.ip_address AS ipallocations_ip_address,
       ipallocations.subnet_id AS ipallocations_subnet_id,
       ipallocations.network_id AS ipallocations_network_id
FROM ipallocations JOIN ports ON ports.id = ipallocations.port_id
WHERE ipallocations.subnet_id = :subnet_id_1
      AND ports.device_owner NOT IN (:device_owner_1)

Change-Id: I34682df784e30e3ce49ee48c690f8b799ad58149
Closes-Bug: #1357055

9 years agoMerge "Remove neutron.tests.common.agents package"
Jenkins [Wed, 22 Apr 2015 09:38:17 +0000 (09:38 +0000)]
Merge "Remove neutron.tests.common.agents package"

9 years agoMerge "Fix test discovery for api and functional paths"
Jenkins [Wed, 22 Apr 2015 04:24:20 +0000 (04:24 +0000)]
Merge "Fix test discovery for api and functional paths"

9 years agoFix test discovery for api and functional paths
Maru Newby [Fri, 17 Apr 2015 23:49:09 +0000 (23:49 +0000)]
Fix test discovery for api and functional paths

The use of the builtin unittest test loader was silently dropping tests
that couldn't be imported.

This change also drops the retargetable path from discovery in the api
path due to a previously-masked configuration problem, and fixes an
invalid import in a functional testing fixture module.

Fullstack tests are also disabled temporarily pending a fix for #1446261.

Change-Id: Ie44e45c117bd864538e7919dfcf499091fde7752
Related-Bug: #1440834
Related-Bug: #1443480
Closes-Bug: #1446405

9 years agotests: confirm that _output_hosts_file does not log too often
Ihar Hrachyshka [Mon, 20 Apr 2015 15:06:38 +0000 (17:06 +0200)]
tests: confirm that _output_hosts_file does not log too often

I3ad7864eeb2f959549ed356a1e34fa18804395cc didn't include any regression unit
tests to validate that the method won't ever log too often again,
reintroducing performance drop in later patches. It didn't play well
with stable backports of the fix, where context was lost when doing the
backport, that left the bug unfixed in stable/juno even though the patch
was merged there [1].

The patch adds an explicit note in the code that suggests not to add new
log messages inside the loop to avoid regression, and a unit test was
added to capture it.

Once the test is merged in master, it will be proposed for stable/juno
inclusion, with additional changes that would fix the regression again.

Related-Bug: #1414218
Change-Id: I5d43021932d6a994638c348eda277dd8337cf041

9 years agoMerge "Fix super cleanUp for fullstack ProcessFixture"
Jenkins [Tue, 21 Apr 2015 16:44:07 +0000 (16:44 +0000)]
Merge "Fix super cleanUp for fullstack ProcessFixture"

9 years agoMerge "Only call get_engine().pool.dispose if _FACADE"
Jenkins [Tue, 21 Apr 2015 16:43:54 +0000 (16:43 +0000)]
Merge "Only call get_engine().pool.dispose if _FACADE"

9 years agoFix super cleanUp for fullstack ProcessFixture
Henry Gessau [Tue, 21 Apr 2015 15:35:10 +0000 (11:35 -0400)]
Fix super cleanUp for fullstack ProcessFixture

This fixes a problem where the fullstack neutro-server process
would sometimes not be stopped after tests completed.

Change-Id: Iadf9f47fc22b39144cfc6163330ca60fefc8b464

9 years agoAdd security groups events
armando-migliaccio [Thu, 16 Apr 2015 19:45:32 +0000 (12:45 -0700)]
Add security groups events

ML2 mech drivers have no direct exposure to security groups,
and they can only infer them from the associated network/ports.
This is problematic as agentless ML2 mech drivers have no way of
intercepting securitygroups events and propagate the information
to their backend, or more generally, react to them.

This patch leverages the callback registry to dispatch such events
so that interested ML2 mech drivers (or any interested party like
service plugins) can be notified and react accordingly.

This patch addresses create/update/delete of security groups and
create/delete of security groups rules. Other events may be added
over time, if need be.

This patch is only about emitting the events. The actual subscription
and implementation of the event handlers will have to take place where
deemed appropriate.

Closes-bug: #1444112

Change-Id: Ifa1d7ee9c967576f824f1129dd68e6e3abd48f5c

9 years agoMerge "Revive BaseLinuxTestCase._create_namespace"
Jenkins [Tue, 21 Apr 2015 15:03:15 +0000 (15:03 +0000)]
Merge "Revive BaseLinuxTestCase._create_namespace"

9 years agoRemove neutron.tests.common.agents package
Jakub Libosvar [Tue, 21 Apr 2015 14:44:58 +0000 (16:44 +0200)]
Remove neutron.tests.common.agents package

It seems like agents' package content was removed by commit
01a7ba19cf6661b1aef7d08fb748bb2470caf28f but package itself was left in
the tree.

Change-Id: I651f8010aa7c4af59ce403b099db7bc064364133

9 years agoL3 DB: Defer port DB subnet lookups
Kevin Benton [Fri, 17 Apr 2015 11:46:11 +0000 (04:46 -0700)]
L3 DB: Defer port DB subnet lookups

_populate_subnets_for_ports was being called multiple
times for different interface types during the get_routers
process.

This patch eliminates those extra queries by deferring the
subnet information population until after all of the interfaces
have been looked up. Includes a function rename as well to
indicate that a function is only used internally.

Change-Id: Ib46f685d72eb61ecbaa2869e28fb173cd6d49552
Partial-bug: #1445412

9 years agoOnly update MTU in update code for MTU
Kevin Benton [Tue, 21 Apr 2015 05:26:22 +0000 (22:26 -0700)]
Only update MTU in update code for MTU

The ML2 create_network_db was re-passing in the entire network
with extensions like vlan_transparency present that was causing
issues in the base update function it was calling.

This corrects the behavior by having it only update the MTU, which
is the only thing it was intending to update in the first place.

Change-Id: I723c5c138e0830de98f6024c7635ec65065e9346
Closes-Bug: #1446784

9 years agoRevive BaseLinuxTestCase._create_namespace
YAMAMOTO Takashi [Tue, 21 Apr 2015 05:07:08 +0000 (14:07 +0900)]
Revive BaseLinuxTestCase._create_namespace

It was removed by commit 7f7343b1afc0b1b953e5c36a753397a6d37316cb
but still have a few users.

Closes-Bug: #1446465
Change-Id: I2914700f17ae38a775735906931f0f616c13c602

9 years agoMerge "_create_subnet_from_implicit_pool assumes external network extension"
Jenkins [Tue, 21 Apr 2015 04:19:47 +0000 (04:19 +0000)]
Merge "_create_subnet_from_implicit_pool assumes external network extension"

9 years agoMerge "Log caught exceptions while deleting a router"
Jenkins [Tue, 21 Apr 2015 04:10:55 +0000 (04:10 +0000)]
Merge "Log caught exceptions while deleting a router"

9 years agoMerge "Strip unnecessary overrides in extraroute_db mixin"
Jenkins [Tue, 21 Apr 2015 03:55:12 +0000 (03:55 +0000)]
Merge "Strip unnecessary overrides in extraroute_db mixin"

9 years agoMerge "Define FakeMachine helper for functional/fullstack tests"
Jenkins [Tue, 21 Apr 2015 03:52:17 +0000 (03:52 +0000)]
Merge "Define FakeMachine helper for functional/fullstack tests"

9 years agoDefer creation of router JSON in get_routers RPC
Kevin Benton [Fri, 17 Apr 2015 10:53:45 +0000 (03:53 -0700)]
Defer creation of router JSON in get_routers RPC

The get_routers method in the l3 RPC code has a log.debug
statement that formats all of the router data as indented
JSON. This method can be expensive if there are hundreds
of routers being synced and it happens even if debugging
is disabled since the function call result is the parameter
to the debug statement.

This patch adds and leverages a small helper class that takes a
callable and its args and defers calling it until the __str__ method
is called on it when it's actually trying to be rendered to a string.

Change-Id: I2bfceb286ce30f2a3595381b62bdc6dd71ed8483
Partial-Bug: #1445412

9 years agoMerge "Replace custom method call logger with oslo.log helper"
Jenkins [Mon, 20 Apr 2015 20:21:22 +0000 (20:21 +0000)]
Merge "Replace custom method call logger with oslo.log helper"

9 years ago_create_subnet_from_implicit_pool assumes external network extension
Aaron Rosen [Mon, 20 Apr 2015 19:45:12 +0000 (12:45 -0700)]
_create_subnet_from_implicit_pool assumes external network extension

network.external is only present if one is using the external_net_db
mixin. This patch just adds a check to see network has the attribute
external to avoid an Attribute error.

Closes-bug: 1441793
Change-Id: Ic003879b557a8c7ab52268a95d08d6d710618438

9 years agoLog caught exceptions while deleting a router
Assaf Muller [Mon, 20 Apr 2015 19:15:34 +0000 (15:15 -0400)]
Log caught exceptions while deleting a router

Change-Id: I2c270f1eebf4f3c0d2cecdef457efc626e503975
Closes-Bug: #1446349

9 years agoMerge "Avoid double-hopping deletes for security group rules"
Jenkins [Mon, 20 Apr 2015 19:16:45 +0000 (19:16 +0000)]
Merge "Avoid double-hopping deletes for security group rules"

9 years agoMerge "Clarify the init logic for the ML2 plugin"
Jenkins [Mon, 20 Apr 2015 19:13:22 +0000 (19:13 +0000)]
Merge "Clarify the init logic for the ML2 plugin"

9 years agoDefine FakeMachine helper for functional/fullstack tests
Cedric Brandily [Sun, 1 Mar 2015 22:08:58 +0000 (22:08 +0000)]
Define FakeMachine helper for functional/fullstack tests

The change defines the FakeMachine fixture/helper which emulates a
machine through a namespace with:
* a port bound to a bridge,
* an ip on the port,
* a gateway (if requested).

The FakeMachine class can be used to emulate:
* a VM for testing network features (ex: metadata service),
* an external machine for testing "external" network features (ex:
  routing/natting),
* a server for low level tests of network features (ex: iptables).

The change also defines PeerMachines fixture/helper to create some fake
machines bound to a bridge.

Change-Id: I4fde1a03badd9adfd14b9124b5602331b69dda9d

9 years agoReplace custom method call logger with oslo.log helper
Ihar Hrachyshka [Mon, 30 Mar 2015 16:41:28 +0000 (18:41 +0200)]
Replace custom method call logger with oslo.log helper

oslo.log now provides a logging helper that is similar to custom neutron
helper (actually, the helper in oslo.log started from neutron version).

Now switching to library implementation.

Deprecated neutron.common.log.log

Change-Id: I85d5fc570950ff18cfdb8db20ad20b166e195299

9 years agoMerge "Add Kilo release milestone"
Jenkins [Mon, 20 Apr 2015 10:50:21 +0000 (10:50 +0000)]
Merge "Add Kilo release milestone"

9 years agoMerge "Drop the ovs_lib compat layer as per TODO note"
Jenkins [Mon, 20 Apr 2015 10:12:36 +0000 (10:12 +0000)]
Merge "Drop the ovs_lib compat layer as per TODO note"

9 years agoMerge "Correct typo for matching non-dict ovsdb rows"
Jenkins [Mon, 20 Apr 2015 07:34:32 +0000 (07:34 +0000)]
Merge "Correct typo for matching non-dict ovsdb rows"

9 years agoSimplify keepalived.virtual_routes
Assaf Muller [Mon, 2 Mar 2015 16:29:51 +0000 (11:29 -0500)]
Simplify keepalived.virtual_routes

keepalived.virtual_routes previously held one list of virtual
routes of different kinds, and the HA router class manipulated
that list directly. The list held both the default gateway
virtual route, and any extra routes. This means that when adding
extra routes for example, the HA router would first have to
remove all routes that are not default gateway routes, then add
the extra routes received via RPC.

This is messy because:
a) It's needlessly complicated
b) It's fragile
c) There's zero separation of concerns (HA router should not know
   how keepalived maintains its list of virtual routes)
d) It requires changes to the management of the default gateway
   and virtual routes just to add another type of extra routes

This patch solves these issues by separating the persistency of
virtual routes according to their role.

Co-Authored-By: gong yong sheng <gong.yongsheng@99cloud.net>
Related-Bug: 1414640
Change-Id: I1406b1876c3a47b110818686b42e5f2f688154fa

9 years agoMerge "Enhance OVSDB Transaction timeout configuration"
Jenkins [Sun, 19 Apr 2015 05:13:47 +0000 (05:13 +0000)]
Merge "Enhance OVSDB Transaction timeout configuration"

9 years agoMerge "Add full-stack test"
Jenkins [Sat, 18 Apr 2015 13:15:14 +0000 (13:15 +0000)]
Merge "Add full-stack test"

9 years agoMerge "Add some more comments to models/frozen.py"
Jenkins [Sat, 18 Apr 2015 08:25:37 +0000 (08:25 +0000)]
Merge "Add some more comments to models/frozen.py"

9 years agoMerge "Deal with TODO related to Security Groups RPC API's classes"
Jenkins [Sat, 18 Apr 2015 05:13:09 +0000 (05:13 +0000)]
Merge "Deal with TODO related to Security Groups RPC API's classes"

9 years agoMerge "Set loading strategy to joined for Routerport/Port"
Jenkins [Sat, 18 Apr 2015 03:54:18 +0000 (03:54 +0000)]
Merge "Set loading strategy to joined for Routerport/Port"

9 years agoMerge "Revert connection option post full-stack tests"
Jenkins [Sat, 18 Apr 2015 01:51:18 +0000 (01:51 +0000)]
Merge "Revert connection option post full-stack tests"

9 years agoMerge "create_resource should return maximum length str"
Jenkins [Sat, 18 Apr 2015 01:51:02 +0000 (01:51 +0000)]
Merge "create_resource should return maximum length str"

9 years agoMerge "Remove double queries in l3 DB get methods"
Jenkins [Sat, 18 Apr 2015 01:48:16 +0000 (01:48 +0000)]
Merge "Remove double queries in l3 DB get methods"

9 years agoCorrect typo for matching non-dict ovsdb rows
Terry Wilson [Fri, 17 Apr 2015 21:13:09 +0000 (16:13 -0500)]
Correct typo for matching non-dict ovsdb rows

As can be seen just above, the correct operator for the equality
test is '=' and not '=='. This match isn't currently being used
in the neutron code, but will be used by the OVN driver.

The previous code would also raise NotImplemented when there was
no match.

Change-Id: I17ac85d1ad68d3e207225db300f65c0df1f6e1ad

9 years agoMerge "Fixes race condition and boosts the scheduling performance"
Jenkins [Fri, 17 Apr 2015 19:48:09 +0000 (19:48 +0000)]
Merge "Fixes race condition and boosts the scheduling performance"

9 years agoMerge "ML2: Change port status only when it's bound to the host"
Jenkins [Fri, 17 Apr 2015 19:24:31 +0000 (19:24 +0000)]
Merge "ML2: Change port status only when it's bound to the host"

9 years agoFixes race condition and boosts the scheduling performance
Swaminathan Vasudevan [Wed, 15 Apr 2015 04:34:33 +0000 (21:34 -0700)]
Fixes race condition and boosts the scheduling performance

This patch fixes a race-condition that occurs when the
scheduler tries to check for dvr serviceable ports before
it schedules a router when a subnet is associated with
a router.

Sometimes the dhcp port creation is delayed and so the
router is not scheduled to the l3-agent.

Also it boosts the scheduling performance on dvr-snat
node for scheduling a router.

This patch will provide a work around to fix this race
condition and to boost the scheduling performance
by scheduling a router on a dvr-snat when
dhcp is enabled on the provided subnet, instead of checking
all the available ports on the subnet.

Closes-Bug: #1442494

Change-Id: I089fefdd8535bdc9ed90b3230438ab0bfb6aab4f

9 years agoMerge "Quota model: use HasTenantId mixin"
Jenkins [Fri, 17 Apr 2015 14:09:44 +0000 (14:09 +0000)]
Merge "Quota model: use HasTenantId mixin"

9 years agoMerge "Removed jsonrpclib dependency"
Jenkins [Fri, 17 Apr 2015 13:54:26 +0000 (13:54 +0000)]
Merge "Removed jsonrpclib dependency"

9 years agoML2: Change port status only when it's bound to the host
mathieu-rohon [Sat, 7 Mar 2015 12:30:49 +0000 (13:30 +0100)]
ML2: Change port status only when it's bound to the host

Currently, nothing prevents the port status to be changed to BUILD
state when get_device_details() is sent by a host that doesn't own
the port.
In some cases the port might stay in BUILD state.
This could happen during a live-migration, or for multi-hosted ports
such as HA ports.
This commit allows the port status modification only if the port
is bound to the host that is asking for it.

Closes-Bug: #1439857
Closes-Bug: #1438040
Closes-Bug: #1416933

Change-Id: I9b3673f453abbafaaa4f78542fcfebe8dc93f2bb

9 years agoRemove double queries in l3 DB get methods
Kevin Benton [Fri, 17 Apr 2015 11:28:58 +0000 (04:28 -0700)]
Remove double queries in l3 DB get methods

Two frequently called functions were querying the routerport table
and the corresponding ports just to get the port ID. Then they were
calling get_ports again with those port IDs, resulting in two queries
to the port table when there should have only been one.

This eliminates the second call to get_ports since all of the necessary
data hase been retrieved from the port table.

Change-Id: I806e9c380b7de048fe084b2baf4b6f92ab0edf6b
Partial-Bug: #1445412

9 years agoStrip unnecessary overrides in extraroute_db mixin
Kevin Benton [Fri, 17 Apr 2015 11:18:56 +0000 (04:18 -0700)]
Strip unnecessary overrides in extraroute_db mixin

The extra route DB mixin seemed to be overriding the
get_router and get_routers method for no reason. They
both just called the super version of themselves with
the same arguments.

This patch just pulls those functions out. Found in
tracebacks while working on a related bug.

Change-Id: Ifd1a0676073e91104db3a13df6fe1eb2189f20f5
Related-bug: #1445412

9 years agoSet loading strategy to joined for Routerport/Port
Kevin Benton [Fri, 17 Apr 2015 10:36:50 +0000 (03:36 -0700)]
Set loading strategy to joined for Routerport/Port

The RouterPort model has a relationship to the ports model which
is frequently relied on to get the port IDs of interfaces attached
to a router. However, this defaults to the loading strategy to
'select', which meant a new query was being emitted for every
interface to the ports table just to get the ID.

This patch adjusts the relationship to be 'joined' by default so
one query will fetch the related ports.

Another option would have been not to use the port object at all since
the ID is all that the callers were usually interested in. However,
they would end up using the ID to do a port lookup, which is being
optimized away in another patch anyway so the full port object from
the relationship will end up getting used.

Change-Id: Id1ae35f845f7367d5f1f065c6fa637da7b980a2b
Partial-Bug: #1445412

9 years agoMerge "Added config variable for External Network type in ML2"
Jenkins [Fri, 17 Apr 2015 09:13:58 +0000 (09:13 +0000)]
Merge "Added config variable for External Network type in ML2"

9 years agoMerge "Update decomp progress chart"
Jenkins [Fri, 17 Apr 2015 04:22:03 +0000 (04:22 +0000)]
Merge "Update decomp progress chart"

9 years agoAvoid double-hopping deletes for security group rules
armando-migliaccio [Fri, 17 Apr 2015 00:37:51 +0000 (17:37 -0700)]
Avoid double-hopping deletes for security group rules

There is no need to get and delete; we can delete with one bullet.
This will most likely have quite a decent performance benefit overall.

The patch preserves the existing logic of raising and error on the missing
element; a test was added to spur up the coverage.

Related-bug: #1444112

Change-Id: Iaef77bd3f7775ed91d374838fb5488d925b4062c

9 years agoSet IPset hash type to 'net' instead of 'ip'
Kevin Benton [Tue, 31 Mar 2015 06:52:56 +0000 (23:52 -0700)]
Set IPset hash type to 'net' instead of 'ip'

The previous hash type was 'ip' and this caused a major
issue with the allowed address pairs extension since it
results in CIDRs being passed to ipset. When the hash type
is 'ip', a CIDR is completely enumerated into all of its
addresses so 10.100.0.0/16 results in ~65k entries. This
meant a single allowed_address_pairs entry could easily
exhaust an entire set.

This patch changes the hash type to 'net', which is designed
to handle a CIDRs as a single entry.

This patch also changes the names of the ipsets because
creating an ipset with different parameters will cause an
error and our ipset manager code isn't robust enough to handle
that at this time. There is another ongoing patch to fix
that but it won't be ready in time.[1]

The related bug was closed by increasing the set limit, which
did alleviate the problem. However, this change would also
address the issue because the gate tests run an allowed address
pairs extension test with the CIDR mentioned above.

1. I59e2e1c090cb95ee1bd14dbb53b6ff2c5e2713fd

Related-Bug: #1439817
Closes-Bug: #1444397
Change-Id: I8177699b157cd3eac46e2f481f47b5d966c49b07

9 years agoMerge "Revert "Add ipset element and hashsize tunables""
Jenkins [Thu, 16 Apr 2015 22:12:03 +0000 (22:12 +0000)]
Merge "Revert "Add ipset element and hashsize tunables""

9 years agoMerge "Synced versionutils from oslo-incubator"
Jenkins [Thu, 16 Apr 2015 19:49:00 +0000 (19:49 +0000)]
Merge "Synced versionutils from oslo-incubator"

9 years agoQuota model: use HasTenantId mixin
Salvatore Orlando [Thu, 16 Apr 2015 18:57:37 +0000 (11:57 -0700)]
Quota model: use HasTenantId mixin

This change simply changes the Quota model class to obtain
the tenant_id from the mixin class. As the attribute in the
mixin is identical to that in the model there is no need for
a migration.

This patch also removes a reference to quota classes in the
docstring, as Neutron does not implement those. It is good
to be careful when copying and paste code.

Change-Id: Idab15d5ef2ddd2b830a7dcde46990506064535f7
Closes-Bug: #1445169

9 years agoClarify the init logic for the ML2 plugin
armando-migliaccio [Thu, 16 Apr 2015 00:35:13 +0000 (17:35 -0700)]
Clarify the init logic for the ML2 plugin

This patch cleans up the init logic for the plugin so that
we better separate the tasks required for establishing
the integration with DHCP and RPC layers.

In other words: some bikeshedding whilst dealing with bug #1444112

Change-Id: I68710ad002b0e1b5bff40baa5de343b0bd7ecea6

9 years agoDeal with TODO related to Security Groups RPC API's classes
armando-migliaccio [Thu, 16 Apr 2015 00:35:13 +0000 (17:35 -0700)]
Deal with TODO related to Security Groups RPC API's classes

Change-Id: Ifb70a118cef48c3c4cd313e22e907aa47bc51ad0

9 years agoAdd Kilo release milestone
Henry Gessau [Thu, 16 Apr 2015 17:38:46 +0000 (13:38 -0400)]
Add Kilo release milestone

Change-Id: Id7d969c92b7c757b766760681357ac13c8079ca3

9 years agoMerge "Increase max attempts to 2 for pings on ARP tests"
Jenkins [Thu, 16 Apr 2015 14:10:53 +0000 (14:10 +0000)]
Merge "Increase max attempts to 2 for pings on ARP tests"

9 years agoAdd some more comments to models/frozen.py
AKamyshnikova [Thu, 16 Apr 2015 13:25:42 +0000 (16:25 +0300)]
Add some more comments to models/frozen.py

Some people get confused and tried to add new models in models/frozen.py
To prevent this add some more information in comments in this file.

Change-Id: Iaa52ae2a826609f94e1aa81d815ae7c082bf9204

9 years agoMerge "Provide details for configure multiple DHCP agents"
Jenkins [Thu, 16 Apr 2015 13:13:39 +0000 (13:13 +0000)]
Merge "Provide details for configure multiple DHCP agents"

9 years agoImported Translations from Transifex
OpenStack Proposal Bot [Thu, 16 Apr 2015 06:13:44 +0000 (06:13 +0000)]
Imported Translations from Transifex

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

Change-Id: I700d3463e560d09e61f9d709b60f64b91feaa735

9 years agoMerge "Router is not unscheduled when the last port is deleted"
Jenkins [Thu, 16 Apr 2015 04:10:03 +0000 (04:10 +0000)]
Merge "Router is not unscheduled when the last port is deleted"

9 years agoMerge "IPv6 SLAAC subnet create should update ports on net"
Jenkins [Thu, 16 Apr 2015 03:44:58 +0000 (03:44 +0000)]
Merge "IPv6 SLAAC subnet create should update ports on net"

9 years agoMerge "Stop running L3 functional tests with both OVSDB interfaces"
Jenkins [Thu, 16 Apr 2015 01:32:01 +0000 (01:32 +0000)]
Merge "Stop running L3 functional tests with both OVSDB interfaces"

9 years agoDrop the ovs_lib compat layer as per TODO note
armando-migliaccio [Thu, 16 Apr 2015 01:20:51 +0000 (18:20 -0700)]
Drop the ovs_lib compat layer as per TODO note

Breakage documented in [1]

[1] https://wiki.openstack.org/wiki/Neutron/LibraryAPIBreakage

Change-Id: I41820faf8ef7fd00cf864da6f1a63ccb79c25fd8

9 years agoIPv6 SLAAC subnet create should update ports on net
Dane LeBlanc [Thu, 9 Apr 2015 14:32:33 +0000 (10:32 -0400)]
IPv6 SLAAC subnet create should update ports on net

If ports are first created on a network, and then an IPv6 SLAAC
or DHCPv6-stateless subnet is created on that network, then the
ports created prior to the subnet create are not getting
automatically updated (associated) with addresses for the
SLAAC/DHCPv6-stateless subnet, as required.

Change-Id: I88d04a13ce5b8ed4c88eac734e589e8a90e986a0
Closes-Bug: 1427474
Closes-Bug: 1441382
Closes-Bug: 1440183

9 years agoMerge "Use 'port' instead of 'ports' to reference port from IPAllocation"
Jenkins [Wed, 15 Apr 2015 16:35:08 +0000 (16:35 +0000)]
Merge "Use 'port' instead of 'ports' to reference port from IPAllocation"

9 years agoMerge "OOP cleanup: start protected method names with underscore"
Jenkins [Wed, 15 Apr 2015 16:28:49 +0000 (16:28 +0000)]
Merge "OOP cleanup: start protected method names with underscore"

9 years agoMerge "Some cleanup in L3 HA code"
Jenkins [Wed, 15 Apr 2015 15:24:14 +0000 (15:24 +0000)]
Merge "Some cleanup in L3 HA code"

9 years agoMerge "Pass correct port ID back to RPC caller"
Jenkins [Wed, 15 Apr 2015 09:42:47 +0000 (09:42 +0000)]
Merge "Pass correct port ID back to RPC caller"

9 years agoUse 'port' instead of 'ports' to reference port from IPAllocation
Oleg Bondarev [Fri, 10 Apr 2015 09:03:09 +0000 (12:03 +0300)]
Use 'port' instead of 'ports' to reference port from IPAllocation

'ports' is just confusing as IPAllocation can be associated
with only one port.

Closes-Bug: #1442527
Change-Id: I36bfa65956f54e4b290bb7568499a47eca7c126f

9 years agoEnhance OVSDB Transaction timeout configuration
Gal Sagie [Wed, 15 Apr 2015 06:26:54 +0000 (09:26 +0300)]
Enhance OVSDB Transaction timeout configuration

OVSDB Transaction currently takes the timeout parameter
from a context object that assume to have a vsctl_timeout attribute
This doesnt fit well for other users of this class (like OVN)

This fix configure the transaction timeout in a more common way

Change-Id: I51bb8d8fdc6d061d44af828818aaf62e187795fd
Closes-Bug: #1444277