]> review.fuel-infra Code Review - openstack-build/neutron-build.git/log
openstack-build/neutron-build.git
9 years agoversionutils: switch from incubator version to oslo.log
Ihar Hrachyshka [Thu, 4 Jun 2015 15:58:06 +0000 (17:58 +0200)]
versionutils: switch from incubator version to oslo.log

Note that we require oslo.log >= 1.2.0 since it's the first release that
included the module.

Change-Id: I2b7d587d8c4b0c885873c9c8083abb8fc35780c9

9 years agoMerge "test_db_base_plugin_v2: Don't assume the order of fixed_ips"
Jenkins [Thu, 4 Jun 2015 12:08:31 +0000 (12:08 +0000)]
Merge "test_db_base_plugin_v2: Don't assume the order of fixed_ips"

9 years agoMerge "Use a single method to remove an address with its conntrack state"
Jenkins [Thu, 4 Jun 2015 11:54:10 +0000 (11:54 +0000)]
Merge "Use a single method to remove an address with its conntrack state"

9 years agotest_db_base_plugin_v2: Don't assume the order of fixed_ips
YAMAMOTO Takashi [Wed, 3 Jun 2015 13:21:52 +0000 (22:21 +0900)]
test_db_base_plugin_v2: Don't assume the order of fixed_ips

Fixes test_ip_allocation_for_ipv6_2_subnet_slaac_mode
failures on my environment.

Change-Id: I18a9a177a60c364d79943a8d68b46fde3b9f5d74

9 years agoMerge "Add sub-project lieutenants"
Jenkins [Wed, 3 Jun 2015 23:10:23 +0000 (23:10 +0000)]
Merge "Add sub-project lieutenants"

9 years agoMerge "Refactor type_tunnel/gre/vxlan to reduce duplicate code"
Jenkins [Wed, 3 Jun 2015 23:10:11 +0000 (23:10 +0000)]
Merge "Refactor type_tunnel/gre/vxlan to reduce duplicate code"

9 years agoMerge "Make MockFixedIntervalLoopingCall class as a helper class"
Jenkins [Wed, 3 Jun 2015 18:52:10 +0000 (18:52 +0000)]
Merge "Make MockFixedIntervalLoopingCall class as a helper class"

9 years agoMerge "Move full-stack logs post-tests"
Jenkins [Wed, 3 Jun 2015 17:34:55 +0000 (17:34 +0000)]
Merge "Move full-stack logs post-tests"

9 years agoMerge "Fix confusing parameters names"
Jenkins [Wed, 3 Jun 2015 16:10:06 +0000 (16:10 +0000)]
Merge "Fix confusing parameters names"

9 years agoMerge "Wrap ML2 delete_port with db retry decorator"
Jenkins [Wed, 3 Jun 2015 15:50:11 +0000 (15:50 +0000)]
Merge "Wrap ML2 delete_port with db retry decorator"

9 years agoMerge "Remove extra indent in testcases"
Jenkins [Wed, 3 Jun 2015 15:19:28 +0000 (15:19 +0000)]
Merge "Remove extra indent in testcases"

9 years agoMerge "Python3: use six.iteritems() instead of dict.iteritems()"
Jenkins [Wed, 3 Jun 2015 15:17:08 +0000 (15:17 +0000)]
Merge "Python3: use six.iteritems() instead of dict.iteritems()"

9 years agoUse a single method to remove an address with its conntrack state
Carl Baldwin [Wed, 27 May 2015 20:12:27 +0000 (20:12 +0000)]
Use a single method to remove an address with its conntrack state

I just noticed a pattern and I thought I'd throw this up for
discussion.  It has occurred to me that this addition sort of breaks
the ip_lib paradigm of wrapping ip commands without any additional
useful abstraction.  Any better ideas?

Change-Id: Ibd34bf4a721c153aca916e294e58adb4a28379e4

9 years agoAdd sub-project lieutenants
Russell Bryant [Tue, 2 Jun 2015 19:20:44 +0000 (15:20 -0400)]
Add sub-project lieutenants

A recent patch added the concept of Lieutenants for Neutron.  This
same concept makes a lot of sense for identifying clear points of
contact for the various sub-projects under the Neutron tent.  This
patch adds a table of the projects currently approved as part of
Neutron in the governance repo.  I also made a guess on who the
lieutenant would be based on reviews in stackalytics (except for ones
that weren't in stackalytics).

Change-Id: Ibce5d6ba5e19dec59a10c88749557509136c4e41
Signed-off-by: Russell Bryant <rbryant@redhat.com>
9 years agoFix confusing parameters names
Oleg Bondarev [Wed, 3 Jun 2015 12:38:50 +0000 (15:38 +0300)]
Fix confusing parameters names

Change-Id: Ib00135e1d0b8f334d660de9a80629e084efb13ba

9 years agoExtra indent in test_ovs_neutron_agent
Aman Kumar [Wed, 3 Jun 2015 12:15:25 +0000 (05:15 -0700)]
Extra indent in test_ovs_neutron_agent

This patch removes extra indent errors from test_ovs_neutron_agent

Change-Id: I1270cca3699b7874047f7812710f2611cc465493

9 years agoMerge "Catch broad exception in methods used in FixedIntervalLoopingCall"
Jenkins [Wed, 3 Jun 2015 10:05:42 +0000 (10:05 +0000)]
Merge "Catch broad exception in methods used in FixedIntervalLoopingCall"

9 years agoMerge "Revert "Add VIF_DELETED notification event to Nova""
Jenkins [Wed, 3 Jun 2015 08:39:54 +0000 (08:39 +0000)]
Merge "Revert "Add VIF_DELETED notification event to Nova""

9 years agoMake MockFixedIntervalLoopingCall class as a helper class
Aman Kumar [Wed, 3 Jun 2015 06:49:40 +0000 (23:49 -0700)]
Make MockFixedIntervalLoopingCall class as a helper class

MockFixedIntervalLoopingCall class is used in both the classes
TestOvsNeutronAgent and TestOvsDvrNeutronAgent.

This patch removes the MockFixedIntervalLoopingCall from both the
places and make it as a helper class in test_ovs_neutron_agent.py.
So that it will be used everywhere in test_ovs_neutron_agent.py.

Change-Id: I5e0803436e91b4f20ec03209e9e799a68df4eaf4

9 years agoRevert "Add VIF_DELETED notification event to Nova"
Kevin Benton [Wed, 3 Jun 2015 05:52:51 +0000 (05:52 +0000)]
Revert "Add VIF_DELETED notification event to Nova"

We need to wait until the nova support is added in
I998b6bb80cc0a81d665b61b8c4a424d7219c666f. Otherwise
this generates a ton of error messages in the nova api
log as well as on the neutron side.

This reverts commit 0ace88fd4a75ff213dc36fd16c1f8e7080ab7d6d.

Change-Id: I129c4e4c05cf07d45032fec6f57e0cc17a5a82af
Closes-Bug: #1461391

9 years agoWrap ML2 delete_port with db retry decorator
Oleg Bondarev [Wed, 6 May 2015 09:50:11 +0000 (12:50 +0300)]
Wrap ML2 delete_port with db retry decorator

ML2 delete_port operation currently involves locking ports
and bindings tables which may lead to DBDeadlock errors in certain
cases when several ports are deleted concurrently.
That may happen due to specifics of Galera working in active-active
mode: it may throw deadlock errors when it fails to validate
a change with other members of the cluster.
The fix adds retries to delete port operation to overcome such
deadlocks

Closes-Bug: #1422504
Change-Id: I684691d59c5ac370d74314c3c91857dc709b2d9b

9 years agoMerge "Check for 'removed' in port_info before reference"
Jenkins [Wed, 3 Jun 2015 02:11:42 +0000 (02:11 +0000)]
Merge "Check for 'removed' in port_info before reference"

9 years agoRemove extra indent in testcases
Aaron Rosen [Wed, 3 Jun 2015 00:34:48 +0000 (17:34 -0700)]
Remove extra indent in testcases

Change-Id: I42cb044d75d53eab7ba180954589c718374857ee

9 years agoMerge "Add route to metadata IP by default"
Jenkins [Wed, 3 Jun 2015 00:16:51 +0000 (00:16 +0000)]
Merge "Add route to metadata IP by default"

9 years agoCheck for 'removed' in port_info before reference
Kevin Benton [Tue, 2 Jun 2015 23:52:14 +0000 (16:52 -0700)]
Check for 'removed' in port_info before reference

scan_ports can return early on no changes, in which case
'removed' won't be present in the dict. The deleted_ports
logic wasn't setup to handle that.

This patch checks for the key before trying to reference it.

Change-Id: I0e2c6d76515ad8e2a2addc8d40451ac003a150f7
Closes-Bug: #1461325

9 years agoCatch broad exception in methods used in FixedIntervalLoopingCall
Eugene Nikanorov [Tue, 26 May 2015 16:17:20 +0000 (20:17 +0400)]
Catch broad exception in methods used in FixedIntervalLoopingCall

Unlike other places where it might make sense to catch specific
exceptions, methods that are used to check L3 and DHCP agents
liveness via FixedIntervalLoopingCall should never allow exceptions
to leak to calling method and interrupt the loop.

Further improvement of FixedIntervalLoopingCall might be needed,
but for the sake of easy backporting it makes sense to fix the issue
in neutron before pushing refactoring to 3rd-party library.

Change-Id: I6a61e99a6f4e445e26ea4a9923b47e35559e5703
Closes-Bug: #1458119

9 years agoMerge "Add devref that explains fullstack testing and its direction"
Jenkins [Tue, 2 Jun 2015 22:48:29 +0000 (22:48 +0000)]
Merge "Add devref that explains fullstack testing and its direction"

9 years agoMerge "Add VIF_DELETED notification event to Nova"
Jenkins [Tue, 2 Jun 2015 22:33:42 +0000 (22:33 +0000)]
Merge "Add VIF_DELETED notification event to Nova"

9 years agoAdd devref that explains fullstack testing and its direction
Assaf Muller [Tue, 2 Jun 2015 16:21:11 +0000 (12:21 -0400)]
Add devref that explains fullstack testing and its direction

The goal of this doc is to communicate what are full stack tests,
how they benefit you and when would you write such a test.

Additionally I'd like to communicate the way forward, and gather
feedback about any areas in the code that can benefit from full
stack tests, and any additional thoughts!

Change-Id: Ifd4ff9be0ed0184a49df6566d238c31a328cd23f

9 years agoMerge "Modify ipset functional tests to pass on older machines"
Jenkins [Tue, 2 Jun 2015 19:42:49 +0000 (19:42 +0000)]
Merge "Modify ipset functional tests to pass on older machines"

9 years agoMerge "Remove unused _uuid function alias from test_iptables.py"
Jenkins [Tue, 2 Jun 2015 18:05:45 +0000 (18:05 +0000)]
Merge "Remove unused _uuid function alias from test_iptables.py"

9 years agoMerge "Remove get_dhcp_port RPC method"
Jenkins [Tue, 2 Jun 2015 17:04:00 +0000 (17:04 +0000)]
Merge "Remove get_dhcp_port RPC method"

9 years agoMerge "Don't delete port from bridge on delete_port event"
Jenkins [Tue, 2 Jun 2015 17:02:33 +0000 (17:02 +0000)]
Merge "Don't delete port from bridge on delete_port event"

9 years agoMerge "Don't update floating IP status if no change"
Jenkins [Tue, 2 Jun 2015 16:39:01 +0000 (16:39 +0000)]
Merge "Don't update floating IP status if no change"

9 years agoMerge "Imported Translations from Transifex"
Jenkins [Tue, 2 Jun 2015 15:06:34 +0000 (15:06 +0000)]
Merge "Imported Translations from Transifex"

9 years agoMerge "Update rootwrap.conf to add /usr/local/bin"
Jenkins [Tue, 2 Jun 2015 15:02:22 +0000 (15:02 +0000)]
Merge "Update rootwrap.conf to add /usr/local/bin"

9 years agoRemove get_dhcp_port RPC method
Assaf Muller [Mon, 1 Jun 2015 21:05:56 +0000 (17:05 -0400)]
Remove get_dhcp_port RPC method

This method was last used in Icehouse.  I think we can safely
remove all of its code and tests. Icehouse to Liberty rolling
upgrades are in no way expected to work so I just bumped
the RPC version and removed all traces of the code.

Change-Id: Ia545c5be7da80c919ad5bae6074bc1cc3aa89fa0
Closes-Bug: #1314534

9 years agoMerge "Move pool dispose() before os.fork"
Jenkins [Tue, 2 Jun 2015 08:17:55 +0000 (08:17 +0000)]
Merge "Move pool dispose() before os.fork"

9 years agoRefactor type_tunnel/gre/vxlan to reduce duplicate code
Cedric Brandily [Sat, 30 May 2015 18:41:29 +0000 (20:41 +0200)]
Refactor type_tunnel/gre/vxlan to reduce duplicate code

gre and vxlan type drivers have similar implementations for multiple
methods:
* get_endpoint_by_host
* get_endpoint_by_ip
* delete_endpoint
* get_endpoints
* add_endpoint

This change abstracts these methods and moves the abstractions to the
new class EndpointTunnelTypeDriver.

Change-Id: Iab97f8283b6bf5586334958de950664f6e74202a

9 years agoImported Translations from Transifex
OpenStack Proposal Bot [Tue, 2 Jun 2015 06:15:35 +0000 (06:15 +0000)]
Imported Translations from Transifex

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

Change-Id: Iadf5c59306dd4f8ce574a2d7259bd6a03d60a72a

9 years agoUpdate rootwrap.conf to add /usr/local/bin
Gal Sagie [Tue, 2 Jun 2015 05:49:10 +0000 (08:49 +0300)]
Update rootwrap.conf to add /usr/local/bin

When working with OVN i found on Fedora 21 that
my ovs-vsctl is installed in /usr/local/bin, since this wasnt in
rootwrap DHCP didnt work properly.
This change adds it to rootwrap

Change-Id: Ib3646933744ca6b20ecd5ad0cedcedb4f1fa5f12

9 years agoAdd route to metadata IP by default
Eugene Nikanorov [Tue, 2 Jun 2015 02:15:39 +0000 (06:15 +0400)]
Add route to metadata IP by default

Windows VMs try to resolve metadata ip 169.254.169.254 as
local address by default, which results in very slow access
to metadata url during boot.
Injecting direct route to metadata ip through a subnet's default
gateway helps Windows to avoid wasting time on mac resolution.

So this patch injects host route for metadata ip for networks plugged
into a router.

Closes-Bug: #1460793

Change-Id: Ic991f9d7f9a8cf942e3e29f2da03d73c0f26470a

9 years agoMerge "test_ovs_neutron_agent: Remove unnecessary mocking"
Jenkins [Tue, 2 Jun 2015 00:41:23 +0000 (00:41 +0000)]
Merge "test_ovs_neutron_agent: Remove unnecessary mocking"

9 years agoMerge "Refactor type_gre.vxlan tests to reduce duplicate code"
Jenkins [Tue, 2 Jun 2015 00:41:12 +0000 (00:41 +0000)]
Merge "Refactor type_gre.vxlan tests to reduce duplicate code"

9 years agoMerge "Add use_slave DB api support"
Jenkins [Tue, 2 Jun 2015 00:32:37 +0000 (00:32 +0000)]
Merge "Add use_slave DB api support"

9 years agoMerge "Implement IPAM Driver loader"
Jenkins [Mon, 1 Jun 2015 23:29:35 +0000 (23:29 +0000)]
Merge "Implement IPAM Driver loader"

9 years agoPython3: use six.iteritems() instead of dict.iteritems()
Cyril Roelandt [Mon, 1 Jun 2015 20:53:46 +0000 (20:53 +0000)]
Python3: use six.iteritems() instead of dict.iteritems()

This also adds a check to neutron/hacking/checks.py that should catch this
error in the future.

Blueprint: neutron-python3
Change-Id: Ie7b833ffa173772d39b85ee3ecaddace18e1274f

9 years agoModify ipset functional tests to pass on older machines
Assaf Muller [Fri, 29 May 2015 23:17:34 +0000 (19:17 -0400)]
Modify ipset functional tests to pass on older machines

Production code uses ipset exclusively in the root namespace,
however functional testing uses ipset in namespace for isolation.
This poses an issue as ipset is not supported in namespaces on
all kernels and distributions (I'm looking at you CentOS/RHEL 7.1).

This patch changes the ipset functional tests to work in the root
namespace while taking care of cleanups.

Change-Id: I08b2f59197ed76e59b2e58b5a10820653e857cda
Closes-Bug: #1460220

9 years agoMerge "Create bridges in ovsdb monitor functional tests"
Jenkins [Mon, 1 Jun 2015 17:08:42 +0000 (17:08 +0000)]
Merge "Create bridges in ovsdb monitor functional tests"

9 years agoMerge "Use accessors instead of private attributes for Ml2 plugin"
Jenkins [Mon, 1 Jun 2015 17:08:17 +0000 (17:08 +0000)]
Merge "Use accessors instead of private attributes for Ml2 plugin"

9 years agoMerge "OVS-agent: Remove optional flags from br_tun.deferred() method"
Jenkins [Mon, 1 Jun 2015 17:08:05 +0000 (17:08 +0000)]
Merge "OVS-agent: Remove optional flags from br_tun.deferred() method"

9 years agoImplement IPAM Driver loader
Pavel Bondar [Thu, 15 Jan 2015 12:00:02 +0000 (15:00 +0300)]
Implement IPAM Driver loader

IPAM Driver is loaded based on value of 'ipam_driver'.
Added new variable 'ipam_driver' in config.

DocImpact
Partially-Implements: blueprint neutron-ipam

Change-Id: Ia52ad70ef4f0b02cf82cfefcf50b9f1e30b05b79

9 years agoRemove comment about hash seed in tox.ini
Elena Ezhova [Mon, 1 Jun 2015 09:58:32 +0000 (12:58 +0300)]
Remove comment about hash seed in tox.ini

Enable random hash seeds change [1] has merged so the comment
can be safely removed.

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

Change-Id: I93f64841792f9c38f5121ca47c130ad769c11dc4

9 years agoRemove unused _uuid function alias from test_iptables.py
Henry Gessau [Sun, 31 May 2015 18:51:50 +0000 (14:51 -0400)]
Remove unused _uuid function alias from test_iptables.py

Change-Id: If80de5ee6588ffd2338387e6592cf2812b106e1f

9 years agoMerge "Enable random hash seeds"
Jenkins [Sun, 31 May 2015 14:49:34 +0000 (14:49 +0000)]
Merge "Enable random hash seeds"

9 years agoMerge "Removed duplicate keys in dicts in test"
Jenkins [Sun, 31 May 2015 14:47:44 +0000 (14:47 +0000)]
Merge "Removed duplicate keys in dicts in test"

9 years agotest_ovs_neutron_agent: Remove unnecessary mocking
YAMAMOTO Takashi [Fri, 29 May 2015 06:00:45 +0000 (15:00 +0900)]
test_ovs_neutron_agent: Remove unnecessary mocking

Leftover from change I90b4d2485e3e491f496dfb7bdee03d57f393be35.

Change-Id: Ia2596718678d3102ad99acbdf30be7ef0f52ad27

9 years agoRefactor type_gre.vxlan tests to reduce duplicate code
Cedric Brandily [Sat, 30 May 2015 20:04:59 +0000 (22:04 +0200)]
Refactor type_gre.vxlan tests to reduce duplicate code

gre and vxlan type drivers unittests have similar tests. This change
abstracts these tests and moves them to TunnelTypeTestMixin[1].

[1] neutron.tests.unit.plugins.ml2.drivers.base_type_tunnel

Change-Id: I13b0507991e840ff34de7ed7ffd31d359691b0ca

9 years agoMerge "Improve test_set_members_deleting_less_than_5"
Jenkins [Sat, 30 May 2015 20:04:02 +0000 (20:04 +0000)]
Merge "Improve test_set_members_deleting_less_than_5"

9 years agoMerge "Fix formatting of core-reviewers doc"
Jenkins [Sat, 30 May 2015 15:18:32 +0000 (15:18 +0000)]
Merge "Fix formatting of core-reviewers doc"

9 years agoMerge "Get completely rid of contextlib.nested"
Jenkins [Sat, 30 May 2015 15:18:16 +0000 (15:18 +0000)]
Merge "Get completely rid of contextlib.nested"

9 years agoMerge "Fix indentation errors in tests"
Jenkins [Sat, 30 May 2015 14:48:57 +0000 (14:48 +0000)]
Merge "Fix indentation errors in tests"

9 years agoRemoved duplicate keys in dicts in test
Alexander Ignatov [Fri, 29 May 2015 21:49:31 +0000 (00:49 +0300)]
Removed duplicate keys in dicts in test

Test test_create_security_group_rule_invalid_ethertype_for_prefix
contained dict with duplicate keys, remote ip prefixes.

Test was successful because incorrect items for tests were overwitten:

'192.168.1.1/24': 'ipv4'  by '192.168.1.1/24': 'IPv6'
'2001:db8:1234::/48': 'ipv6' by '2001:db8:1234::/48': 'IPv4'

This patch removes incorrect and useless items for tests.
Also added additional item with invalid ethertype.

Change-Id: I29cd2b843a7905986de13a1ecfba0cb5797ccaf8

9 years agoDon't update floating IP status if no change
Kevin Benton [Fri, 17 Apr 2015 11:03:38 +0000 (04:03 -0700)]
Don't update floating IP status if no change

The floating IP status was going through all of the
status update code every time the L3 agent sent in
an update, even if the status didn't change.

This patch skips sending updates to the server if the
agent doesn't change the status.

Change-Id: Ic3736bed3dc3e4ccb91f4acfabbf033949e09ce0
Partial-Bug: #1445412

9 years agoDon't delete port from bridge on delete_port event
Kevin Benton [Fri, 1 May 2015 00:14:44 +0000 (17:14 -0700)]
Don't delete port from bridge on delete_port event

Commit d6a55c17360d1aa8ca91849199987ae71e8600ee added
logic to the OVS agent to delete a port from the integration
bridge when a port was deleted on the Neutron side. However,
this led to several races where whoever created the initial
port (e.g. Nova, L3 agent, DHCP agent) would be trying to
remove the port from the bridge at the same time. These
would result in ugly exceptions on one side or the other.

The original commit was trying to address the problem where
the port would maintain connectivity even though it was removed
from the integration bridge.

This patch addresses both cases by removing the iptables rules
for the deleted port and putting it in the dead VLAN so it loses
connectivity. However, it still leaves the port attached to the
integration bridge so the original creator can delete it.

Related-Bug: #1333365
Closes-Bug: #1448148
Change-Id: I7ae7750b7ac7d15325ed9f2d517ca171543b53be

9 years agoMerge "Addressing follow up comments for OVS_LIB fail_mode setting API"
Jenkins [Sat, 30 May 2015 02:10:31 +0000 (02:10 +0000)]
Merge "Addressing follow up comments for OVS_LIB fail_mode setting API"

9 years agoEnable random hash seeds
Cedric Brandily [Tue, 26 May 2015 12:29:15 +0000 (14:29 +0200)]
Enable random hash seeds

Neutron tests have been updated in order to support random hash seed. It
allows to remove PYTHONHASHSEED=0 in tox.ini and remove hashtest tox
environment.

Closes-Bug: #1348818
Change-Id: I1063304dda887eb82c0de8516d5a483fa8943fc1
Depends-On: I8408365825ec1e97a83c2181f38ec1f9468df91e
Depends-On: I1b2bd4100c19004f12822c414aefc86aae9849db
Depends-On: I5077764045a34d1be0e85bb4b80f3655e87692cc

9 years agoFix formatting of core-reviewers doc
Joe Gordon [Fri, 29 May 2015 21:28:34 +0000 (14:28 -0700)]
Fix formatting of core-reviewers doc

Fix some RST formatting issues with the core-reviewers policy document.

When reading the RST rendered version of that document at
http://docs.openstack.org/developer/neutron/policies/core-reviewers.html
I noticed a few rendering issues where were bothering me, so I fixed
them.

Change-Id: Ic6eedc2bb18f6bbb6424542dbf4a88ed52ebea1d

9 years agoMerge "Use os._exit after forking"
Jenkins [Fri, 29 May 2015 21:28:08 +0000 (21:28 +0000)]
Merge "Use os._exit after forking"

9 years agoMerge "Cleanup stale metadata processes on l3 agent sync"
Jenkins [Fri, 29 May 2015 21:26:38 +0000 (21:26 +0000)]
Merge "Cleanup stale metadata processes on l3 agent sync"

9 years agoGet completely rid of contextlib.nested
Adrien Vergé [Fri, 29 May 2015 20:54:33 +0000 (22:54 +0200)]
Get completely rid of contextlib.nested

`contextlib.nested` is deprecated since Python 2.7 and incompatible with
Python 3. This patch removes all its occurences by using the helper
script at [1].

This is a necessary step to allow us running all unit tests with
Python 3 (not just a small subset as it is done now).

[1]: https://github.com/adrienverge/context_unnester

Change-Id: I8d1de09ff38ed0af9fb56f423a2c43476408e0fb
Blueprint: neutron-python3
Closes-Bug: #1428424

9 years agoFix indentation errors in tests
Adrien Vergé [Mon, 25 May 2015 16:46:03 +0000 (18:46 +0200)]
Fix indentation errors in tests

They are some missing/extra indentations in tests source code. This
results in variables used out their scope (which remains unnoticed as
long as `with` contexts do not fail), and prevent refactoring scripts
(such as the one for getting rid of `contextlib.nested` [1]) from
performing well.

This simple patch fixes these indentation errors.

[1]: See change I8d1de09ff38ed0af9fb56f423a2c43476408e0fb

Change-Id: Icef34c7755e0d96c4c5ee85982de86d0ccc196c7
Related-Blueprint: neutron-python3

9 years agoMerge "Sort _get_new/deleted_set_ips responses in unittests"
Jenkins [Fri, 29 May 2015 21:00:29 +0000 (21:00 +0000)]
Merge "Sort _get_new/deleted_set_ips responses in unittests"

9 years agoMerge "Imported Translations from Transifex"
Jenkins [Fri, 29 May 2015 21:00:16 +0000 (21:00 +0000)]
Merge "Imported Translations from Transifex"

9 years agoMerge "Rename test_periodoc_resync_helper to test_periodic_resync_helper"
Jenkins [Fri, 29 May 2015 20:29:52 +0000 (20:29 +0000)]
Merge "Rename test_periodoc_resync_helper to test_periodic_resync_helper"

9 years agoMerge "Fix dhcp _test_sync_state_helper asserting calls wrong"
Jenkins [Fri, 29 May 2015 17:43:40 +0000 (17:43 +0000)]
Merge "Fix dhcp _test_sync_state_helper asserting calls wrong"

9 years agoMerge "test_fork_error: Fix incorrect test mock"
Jenkins [Fri, 29 May 2015 17:40:48 +0000 (17:40 +0000)]
Merge "test_fork_error: Fix incorrect test mock"

9 years agoMerge "Remove use of contextlib.nested (api-tests)"
Jenkins [Fri, 29 May 2015 17:40:21 +0000 (17:40 +0000)]
Merge "Remove use of contextlib.nested (api-tests)"

9 years agoImprove test_set_members_deleting_less_than_5
Cedric Brandily [Wed, 27 May 2015 06:53:00 +0000 (08:53 +0200)]
Improve test_set_members_deleting_less_than_5

In test_set_members_deleting_less_than_5[1], 3 ips are deleted from
ipset but test_set_members_deleting_less_than_5 checked that the
first one was deleted because the call ordering was non-trivial.

The test was successful because
assert_has_calls(expected_calls, any_order=False) allows extra calls
before and after expected_calls.

A parent change[2] forces the call ordering, this allows to check that
the 3 ips are deleted.

[1] neutron.tests.unit.agent.linux.test_ipset_manager
[2] I8408365825ec1e97a83c2181f38ec1f9468df91e

Related-Bug: #1348818

Change-Id: I773e2cd19fdec634b728d0c3a78c1d66392c743f

9 years agoRename test_periodoc_resync_helper to test_periodic_resync_helper
Cedric Brandily [Tue, 26 May 2015 13:24:58 +0000 (13:24 +0000)]
Rename test_periodoc_resync_helper to test_periodic_resync_helper

Change-Id: Iaaf57b5cdbe634af8ceda0fef4c920cdb053eed4

9 years agoSort _get_new/deleted_set_ips responses in unittests
Cedric Brandily [Tue, 26 May 2015 14:38:26 +0000 (14:38 +0000)]
Sort _get_new/deleted_set_ips responses in unittests

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

The test assumed that the _get_new/deleted_set_ips from
neutron.agent.linux.ipset_manager return elements in a particular order.
Found with PYTHONHASHSEED=1.

The fix refactors the test case to force sorted responses from
_get_new/deleted_set_ips during unittests.

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: I8408365825ec1e97a83c2181f38ec1f9468df91e

9 years agoMerge "py34: don't run any tests except unit tests"
Jenkins [Fri, 29 May 2015 13:23:29 +0000 (13:23 +0000)]
Merge "py34: don't run any tests except unit tests"

9 years agoCleanup stale metadata processes on l3 agent sync
Oleg Bondarev [Thu, 14 May 2015 12:09:24 +0000 (15:09 +0300)]
Cleanup stale metadata processes on l3 agent sync

Currently l3 agent only cleans up stale namespaces.
The fix adds checking and deleting stale metadata processes
to NamespaceManager class responsible for clearing stale
namespaces

Change-Id: I2b081803e312589d3d8a7808d286a6c9827ef53f
Closes-Bug: #1455042

9 years agoMerge "Fix ovs agent restore local_vlan_map failed"
Jenkins [Fri, 29 May 2015 06:57:42 +0000 (06:57 +0000)]
Merge "Fix ovs agent restore local_vlan_map failed"

9 years agoImported Translations from Transifex
OpenStack Proposal Bot [Fri, 29 May 2015 06:16:46 +0000 (06:16 +0000)]
Imported Translations from Transifex

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

Change-Id: I79fd889e390b436fd92fd07951517c50a617b961

9 years agoMerge "Use correct time delta function"
Jenkins [Fri, 29 May 2015 05:25:50 +0000 (05:25 +0000)]
Merge "Use correct time delta function"

9 years agoFix ovs agent restore local_vlan_map failed
shihanzhang [Tue, 26 May 2015 01:29:58 +0000 (09:29 +0800)]
Fix ovs agent restore local_vlan_map failed

when ovs agent restart, it will restore the local_vlan_map, but in
some condition, if a device does not be set tag in ovsdb, the function
'db_get_val("Port", port.port_name, "tag")' will return a empty list,
it does not need 'provision_local_vlan' for this device.

Change-Id: I70ed30e6ea5d13e6f14bb41c957320cc21dbca1b
Closes-bug: #1458709

9 years agoUse correct time delta function
Kevin Benton [Thu, 28 May 2015 23:48:04 +0000 (16:48 -0700)]
Use correct time delta function

The .seconds attribute of a timedetla object cannot be taken in
isolation because it can overflow into days. For example, a -1 second
difference will become -1 day and 86399 seconds.

This became a problem when the agent clock was slightly ahead of
the server clock. When calling (server_time - agent_time).seconds
in this scenario, it would go below 0 in the daily seconds and
wraparound to 86399 seconds and -1 day.

This patch corrects the issue by using a method in timeutils that
ends up calling total_seconds(), which was designed for this usecase.
It also restores the formatting that was removed in patch:
Ibfc30444b7a167fb18ae9051a775266236d4ecce

Closes-Bug: #1456760
Change-Id: Ie90249ab68bb5f8d117872d52180c7087d8fac9b

9 years agoMerge "Fix port creation verification of the port-security extension"
Jenkins [Thu, 28 May 2015 23:04:13 +0000 (23:04 +0000)]
Merge "Fix port creation verification of the port-security extension"

9 years agoMerge "Switch to dictionary for iptables find"
Jenkins [Thu, 28 May 2015 22:58:19 +0000 (22:58 +0000)]
Merge "Switch to dictionary for iptables find"

9 years agoMerge "Persist DHCP leases to a local database"
Jenkins [Thu, 28 May 2015 22:07:00 +0000 (22:07 +0000)]
Merge "Persist DHCP leases to a local database"

9 years agoMerge "Process port IP requests before subnet requests"
Jenkins [Thu, 28 May 2015 22:03:46 +0000 (22:03 +0000)]
Merge "Process port IP requests before subnet requests"

9 years agoMerge "Fix a typo in _schedule_network method"
Jenkins [Thu, 28 May 2015 20:41:52 +0000 (20:41 +0000)]
Merge "Fix a typo in _schedule_network method"

9 years agoMerge "Use the correct name for the "Repository Creator's Guide""
Jenkins [Thu, 28 May 2015 20:41:35 +0000 (20:41 +0000)]
Merge "Use the correct name for the "Repository Creator's Guide""

9 years agoMerge "Isolate use of fixed_ips[0] to avoid confusion"
Jenkins [Thu, 28 May 2015 20:41:23 +0000 (20:41 +0000)]
Merge "Isolate use of fixed_ips[0] to avoid confusion"

9 years agoMerge "ML2: Incorrect commented cisco mechanism driver name"
Jenkins [Thu, 28 May 2015 20:41:10 +0000 (20:41 +0000)]
Merge "ML2: Incorrect commented cisco mechanism driver name"

9 years agoMerge "Do not assume order of security group rules"
Jenkins [Thu, 28 May 2015 20:26:00 +0000 (20:26 +0000)]
Merge "Do not assume order of security group rules"

9 years agoMerge "Fix PYTHONHASHSEED bugs in test_security_groups_rpc"
Jenkins [Thu, 28 May 2015 16:49:19 +0000 (16:49 +0000)]
Merge "Fix PYTHONHASHSEED bugs in test_security_groups_rpc"

9 years agoDo not assume order of security group rules
Cedric Brandily [Wed, 27 May 2015 18:30:28 +0000 (20:30 +0200)]
Do not assume order of security group rules

This fixes the unit tests[1] that breaks with a randomized
PYTHONHASHSEED (see the bug report).

The test assumed that the security_group_rules_for_devices method from
neutron.agent.securitygroups_rpc returned security group rules in a
particular order. Found with PYTHONHASHSEED=2.

The fix refactors the test case to handle unsorted security group rules.

[1] neutron.tests.unit.plugins.ml2.test_security_group.\
    TestMl2SGServerRpcCallBack.\
    test_security_group_rules_for_devices_ipv4_ingress_addr_pair

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: I1b2bd4100c19004f12822c414aefc86aae9849db

9 years agoML2: Incorrect commented cisco mechanism driver name
Rich Curran [Thu, 28 May 2015 15:32:21 +0000 (11:32 -0400)]
ML2: Incorrect commented cisco mechanism driver name

The ml2_conf.ini example for the cisco mechanism driver is incorrect.
Update to remove confusion.

Change-Id: I0d3aff31a3bc78ef5ee042ff1f37dbb6e1459635
Closes-Bug: 1459723