]> review.fuel-infra Code Review - openstack-build/neutron-build.git/log
openstack-build/neutron-build.git
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 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 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 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 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

9 years agopy34: don't run any tests except unit tests
Ihar Hrachyshka [Thu, 28 May 2015 12:40:25 +0000 (14:40 +0200)]
py34: don't run any tests except unit tests

py34 job was intended for unit tests only. It's important to distinguish
between different types of tests, because they all have different
requirements to execution environment. E.g. functional tests are not
expected to run in a restricted env designed for unit tests, and that's
even more valid for fullstack tests.

Otherwise, the job may fail or apply irrecoverable changes to test
runner system, breaking the system.

If we ever want to support py3 for other types of tests, we should add
separate jobs just for that.

Note that the neutron-python3 blueprint was not intended to introduce
changes to support anything but unit test execution with the new Python
version, so strictly speaking, any effort to make other test types work
is out of scope.

Change-Id: Ia96f03f05269c1938b51ee26f4b4075b69967bb8

9 years agoFix PYTHONHASHSEED bugs in test_security_groups_rpc
Cedric Brandily [Thu, 28 May 2015 07:07:23 +0000 (09:07 +0200)]
Fix PYTHONHASHSEED bugs in test_security_groups_rpc

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

The test assumed that several dictionaries had elements in a
particular order. Found with PYTHONHASHSEED=2.

The fix refactors the test case by injecting values using the same
ordering[2].

[1] neutron.tests.unit.agent.test_securitygroups_rpc.\
   TestSecurityGroupAgentWithOVSIptables

[2] https://github.com/openstack/neutron/blob/\
   e8364a72e62d83e5a76bec1d7aa76ecfe2ed53ac/\
   neutron/tests/unit/agent/test_securitygroups_rpc.py#L1630-L1635

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

9 years agoAddressing follow up comments for OVS_LIB fail_mode setting API
Gal Sagie [Thu, 28 May 2015 06:17:15 +0000 (09:17 +0300)]
Addressing follow up comments for OVS_LIB fail_mode setting API

Review https://review.openstack.org/#/c/185659/ got merged before i could
see and address the last comment.
This is a follow up patch to address that change

Change-Id: I19135a75cf25e03d6c1f89d7c18e8da3af2ec643

9 years agoMerge "OVS_LIB support API for setting fail mode 'standalone'"
Jenkins [Thu, 28 May 2015 02:58:22 +0000 (02:58 +0000)]
Merge "OVS_LIB support API for setting fail mode 'standalone'"

9 years agoMerge "Add RFE submission guidelines"
Jenkins [Thu, 28 May 2015 02:01:08 +0000 (02:01 +0000)]
Merge "Add RFE submission guidelines"

9 years agoAdd RFE submission guidelines
armando-migliaccio [Wed, 27 May 2015 22:40:06 +0000 (15:40 -0700)]
Add RFE submission guidelines

Change-Id: I864c8638a92f5f94e6f059a477ffb56de274ef1c

9 years agoSwitch to dictionary for iptables find
Kevin Benton [Sat, 16 May 2015 00:10:15 +0000 (17:10 -0700)]
Switch to dictionary for iptables find

The code to find the matching entry was scanning through a
list of all rules for every rule. This became extremely slow
as the number of rules became large, leading to long delays
waiting for firewall rules to be applied.

This patch switches to the use of a dictionary so the cost
becomes a hash lookup instead of a list scan.

Closes-Bug: #1453264
Closes-Bug: #1455675
Change-Id: I1e6fe5e50b9c13066c966c252cadc8ed1d08f686

9 years agoProcess port IP requests before subnet requests
Kevin Benton [Thu, 28 May 2015 00:38:32 +0000 (17:38 -0700)]
Process port IP requests before subnet requests

When a port requests multiple fixed IPs, process the requests
for specific IP addresses before the ones asking for a subnet.
This prevents an error where the IP that was requested happens
to be the next up for allocation so the subnet request takes it
and causes a DBDuplicateEntry.

Closes-Bug: #1459467
Change-Id: I645565c7fe0c47c58d686b25020bb49a0b9089f5

9 years agoMerge "Flesh out the new RFE process and set deadlines for it's use"
Jenkins [Thu, 28 May 2015 00:36:38 +0000 (00:36 +0000)]
Merge "Flesh out the new RFE process and set deadlines for it's use"

9 years agoMerge "Introduce the Lieutenant system into Neutron"
Jenkins [Thu, 28 May 2015 00:36:26 +0000 (00:36 +0000)]
Merge "Introduce the Lieutenant system into Neutron"

9 years agoMerge "Remove time formatting in agent clock error"
Jenkins [Thu, 28 May 2015 00:04:34 +0000 (00:04 +0000)]
Merge "Remove time formatting in agent clock error"

9 years agoRemove time formatting in agent clock error
Kevin Benton [Wed, 27 May 2015 21:52:06 +0000 (14:52 -0700)]
Remove time formatting in agent clock error

This removes time formatting that may be hiding timezone
issues that are leading to a delta being calculated between
the agent and the server even when it shows none. It also
adds logging of the difference so we can see how far off it
thinks they are.

Example message:
during the registration of Open vSwitch agent has a timestamp:
2015-05-19T18:15:27Z. This differs from the current server
timestamp: 2015-05-19T18:15:27Z by more than the threshold agent
downtime: 75.

Note that the timestamps are exactly the same after formatting.

Change-Id: Ibfc30444b7a167fb18ae9051a775266236d4ecce
Related-Bug: #1456760

9 years agoPersist DHCP leases to a local database
Kevin Benton [Tue, 26 May 2015 01:55:44 +0000 (18:55 -0700)]
Persist DHCP leases to a local database

Due to issues caused by dnsmasq restarts sending DHCPNAKs,
change Ieff0236670c1403b5d79ad8e50d7574c1b694e34 passed the
'dhcp-authoritative' option to dnsmasq. While this solved the
restart issue, it broke the multi-DHCP server scenario because
the dnsmasq instances will NAK requests to a server ID that
isn't their own.

Problem DHCP Request Lifecycle:

Client: DHCPDISCOVER(broadcast)
Server1: DHCPOFFER
Server2: DHCPOFFER
Client: DHCPREQUEST(broadcast with Server-ID=Server1)
Server1: DHCPACK
Server2: DHCPNAK(in response to observed DHCPREQUEST with other Server-ID)
          ^---Causes issues

This change removes the authoritative option so NAKs are not
send in response to DHCPREQUEST's to other servers. To handle
the original issue that Ieff0236670c1403b5d79ad8e50d7574c1b694e34
was inteded to address, this patch also allows changes to be persisted
to a local lease file.

In order to handle the issue where a DHCP server may be scheduled
to another agent, a fake lease file is generated for dnsmasq to start
with. The contents are populated based on all of the known ports for
a network. This should prevent dnsmasq from NAKing clients renewing
leases issued before it was restarted/rescheduled.

Closes-Bug: #1457900
Change-Id: Idc91602bf8c474467e596cbd5cbaa8898952c841

9 years agoFlesh out the new RFE process and set deadlines for it's use
Kyle Mestery [Wed, 27 May 2015 17:26:00 +0000 (17:26 +0000)]
Flesh out the new RFE process and set deadlines for it's use

The new RFE process is great in concept, but as was discovered in the
first neutron-drivers meeting where we discussed these, there exist
some rough edges. Specifically around deadlines and the conversion to
using RFEs, the gray area was very obvious. This patch attempts to put
a stake in the ground for when we transition fully to this new model,
including distinct timelines.

Given that we will need to work with people during the transition,
what is proposed is a way to let us do that while not blocking existing
specs and work.

Change-Id: Ife50f65caf4b13405ad60dd4be3d347aa31ef3a7

9 years agoDo not assume order of dictionary elements in init_l3
Cedric Brandily [Wed, 27 May 2015 17:57:04 +0000 (19:57 +0200)]
Do not assume order of dictionary elements in init_l3

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

The test assumed that the init_l3 method from
neutron.agent.linux.interface had dictionary elements in a particular
order. Found with PYTHONHASHSEED=2.

The fix refactors the test case to handle unsorted dictionaries in
init_l3.

[1] neutron.tests.unit.agent.linux.test_interface.TestABCDriver

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

9 years agoIntroduce the Lieutenant system into Neutron
Kyle Mestery [Fri, 24 Apr 2015 16:24:39 +0000 (16:24 +0000)]
Introduce the Lieutenant system into Neutron

As Neutron has grown, the need to continually evolve the way we land
code has changed. As the project has grown, it's become obvious we
need to subdivide responsibilites and merge rights across the
repository. The advanced services split [1] was one way in which we did
this, and it's proven effective. Plugin decomposition was another [2].
As a next step to evolve things, this changes the core reviewer
paradigm into a system of Lieutenants, all reporting to the PTL in the
project. The Lieutenants will be able to maintain their own core
review team. The idea of "super cores" will fade away. And we begin to
see the benefits of a layered, structured approach to managing
Neutron.

This proposal makes an attempt to comment on existing core reviewers.
While the idea of existing core reviewers being labeled as "supercores"
has been floated, the reality is a bit more nuanced than that, and I've
taken steps to address that with this patch. It should be noted that like
all things in Neutron governance, the system is based on a mutual trust.

[1] http://specs.openstack.org/openstack/neutron-specs/specs/kilo/services-split.html
[2] http://specs.openstack.org/openstack/neutron-specs/specs/kilo/core-vendor-decomposition.html

Change-Id: Ia4060066a300e851172c0fd7a2910ce53a6c649e

9 years agoMerge "Skip external tables for neutron-db-manage --autogenerate"
Jenkins [Wed, 27 May 2015 17:22:32 +0000 (17:22 +0000)]
Merge "Skip external tables for neutron-db-manage --autogenerate"

9 years agoIsolate use of fixed_ips[0] to avoid confusion
Carl Baldwin [Tue, 26 May 2015 20:33:56 +0000 (20:33 +0000)]
Isolate use of fixed_ips[0] to avoid confusion

I was looking at the assumption around using fixed_ips[0] in a recent
patch [1].  I thought at the least, the usage of fixed_ips[0] should
be isolated with the comment explaining why it is okay.

I thought that we could also use this patch as an opportunity to vet
the validity of the claim made in the comment.

[1] If4a310da06f9b0076a9f62926a16b574a8c109ce

Change-Id: Iba5713dd7d852429997ff43d98266a9f022d5d86

9 years agoMerge "Do not assume order of convert_kvp_list_to_dict method responses"
Jenkins [Wed, 27 May 2015 14:45:32 +0000 (14:45 +0000)]
Merge "Do not assume order of convert_kvp_list_to_dict method responses"

9 years agoMerge "Add port-security extension API test cases"
Jenkins [Wed, 27 May 2015 14:41:46 +0000 (14:41 +0000)]
Merge "Add port-security extension API test cases"

9 years agoMerge "Do not assume order of iptables_firewall method responses"
Jenkins [Wed, 27 May 2015 13:15:21 +0000 (13:15 +0000)]
Merge "Do not assume order of iptables_firewall method responses"

9 years agoUse the correct name for the "Repository Creator's Guide"
Christian Berendt [Wed, 27 May 2015 13:08:30 +0000 (15:08 +0200)]
Use the correct name for the "Repository Creator's Guide"

Change-Id: Iaa32ab4bfa658a079da08792a7355ad64471f0eb

9 years agoDo not assume order of convert_kvp_list_to_dict method responses
Cedric Brandily [Wed, 27 May 2015 12:54:35 +0000 (14:54 +0200)]
Do not assume order of convert_kvp_list_to_dict method responses

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

The test assumed that the convert_kvp_list_to_dict method from
neutron.api.v2.attributes returned elements in a particular
order. Found with PYTHONHASHSEED=1.

The fix refactors the test case to handle unsorted responses from
convert_kvp_list_to_dict.

[1] neutron.tests.unit.api.v2.test_attributes.TestConvertKvp

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

9 years agoDo not assume order of iptables_firewall method responses
Cedric Brandily [Tue, 26 May 2015 17:54:22 +0000 (19:54 +0200)]
Do not assume order of iptables_firewall method responses

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

The test assumed that the _get_remote_sg_ids and
_determine_remote_sgs_to_remove methods from
neutron.agent.linux.iptables_firewall returned elements in a particular
order. Found with PYTHONHASHSEED=1.

The fix refactors the test case to handle unsorted responses from
_get_remote_sg_ids and _determine_remote_sgs_to_remove.

[1] neutron.tests.unit.agent.linux.test_iptables_firewall:
 test_prepare_port_filter_with_new_members
 test_prepare_port_filter_with_sg_no_member
 test_remove_port_filter_with_destroy_ipset_chain

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

9 years agoDo not assume order of get_sync_data_metering response elements
Cedric Brandily [Tue, 26 May 2015 22:23:09 +0000 (00:23 +0200)]
Do not assume order of get_sync_data_metering response elements

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

The test assumed that the get_sync_data_metering[2] had response
elements in a particular order. Found with PYTHONHASHSEED=1.

The fix refactors the test_add_metering_label_rpc_call test case to handle
an unsorted get_sync_data_metering response. The fix defines the class
UnorderedList[3] which is equal to any permutation of itself.

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.

[1] neutron.tests.unit.services.metering.test_metering_plugin:
 TestMeteringPluginL3AgentScheduler
 TestMeteringPluginL3AgentSchedulerServicePlugin
[2] neutron.services.metering.metering_plugin.MeteringPlugin
[3] neutron.tests.tools

Change-Id: I5d42b827bc72dcacd38eaa2377ce16c47a9e7dbb

9 years agoMerge "Remove unnecessary brackets"
Jenkins [Tue, 26 May 2015 21:33:33 +0000 (21:33 +0000)]
Merge "Remove unnecessary brackets"

9 years agoMerge "OVS-DVR: Suppress a confusing error log about csnat port"
Jenkins [Tue, 26 May 2015 21:29:52 +0000 (21:29 +0000)]
Merge "OVS-DVR: Suppress a confusing error log about csnat port"

9 years agoOVS-agent: Remove optional flags from br_tun.deferred() method
YAMAMOTO Takashi [Tue, 26 May 2015 20:10:33 +0000 (05:10 +0900)]
OVS-agent: Remove optional flags from br_tun.deferred() method

Currently they have no users.
They are not appropriate for this higher-level interface anyway.

Change-Id: I76b8d718e714728df88685ec41262958d2e78cb9

9 years agoOVS_LIB support API for setting fail mode 'standalone'
Gal Sagie [Tue, 26 May 2015 16:16:34 +0000 (19:16 +0300)]
OVS_LIB support API for setting fail mode 'standalone'

The current API only support setting a bridge fail mode
to secure, this patch allow the user to set it to 'standalone'
as well

Change-Id: If7e6532dc7f8527c35834a37144ea4386fe1b861
Closes-Bug: #1458924

9 years agoMerge "VMware: update supported plugins"
Jenkins [Tue, 26 May 2015 16:22:13 +0000 (16:22 +0000)]
Merge "VMware: update supported plugins"

9 years agoMerge "Force order of dhcp.needs_resync_reasons dictionary elements"
Jenkins [Tue, 26 May 2015 16:13:13 +0000 (16:13 +0000)]
Merge "Force order of dhcp.needs_resync_reasons dictionary elements"

9 years agoMerge "Add callback prior to deleting a subnet"
Jenkins [Tue, 26 May 2015 16:13:02 +0000 (16:13 +0000)]
Merge "Add callback prior to deleting a subnet"

9 years agoMerge "OVS-agent: Separate ovs-ofctl using code as a driver"
Jenkins [Tue, 26 May 2015 15:57:25 +0000 (15:57 +0000)]
Merge "OVS-agent: Separate ovs-ofctl using code as a driver"

9 years agoForce order of dhcp.needs_resync_reasons dictionary elements
Cedric Brandily [Tue, 26 May 2015 13:14:11 +0000 (13:14 +0000)]
Force order of dhcp.needs_resync_reasons dictionary elements

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

The test assumed that the dhcp.needs_resync_reasons dictionary from
neutron.agent.dhcp.agent had elements in a particular order. Found with
PYTHONHASHSEED=2.

The fix refactors the test case to force a sorted dhcp.needs_resync_reasons
dictionary.

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

9 years agoRemove use of contextlib.nested (api-tests)
ankitagrawal [Thu, 14 May 2015 12:19:44 +0000 (05:19 -0700)]
Remove use of contextlib.nested (api-tests)

Removed use of contextlib.nested call from codebase, as it has been
deprecated since Python 2.7.

There are also known issues with contextlib.nested that were addressed
by the native support for multiple "with" variables. For instance, if
the first object is created but the second one throws an exception,
the first object's __exit__ is never called. For more information see
https://docs.python.org/2/library/contextlib.html#contextlib.nested
contextlib.nested is also not compatible with Python 3.

Multi-patch set for easier chunks. This one addresses the tests from
neutron/tests/unit/api directory.

Line continuation markers (e.g. '\') had to be used or syntax
errors were thrown. While using parentheses is the preferred way
for multiple line statements, but in case of long with statements
backslashes are acceptable.

Partial-Bug: 1428424
Change-Id: I09673f9d4c7f07d3043804676fef018905dd1239

9 years agoMerge "Register ibm-db-alembic import for DB2 migrations"
Jenkins [Tue, 26 May 2015 09:42:24 +0000 (09:42 +0000)]
Merge "Register ibm-db-alembic import for DB2 migrations"

9 years agoMerge "Reduce prefix and suffix length in ipsets"
Jenkins [Tue, 26 May 2015 09:42:12 +0000 (09:42 +0000)]
Merge "Reduce prefix and suffix length in ipsets"

9 years agoMerge "Ensure mac address added to iptables is always in unix format"
Jenkins [Tue, 26 May 2015 09:42:00 +0000 (09:42 +0000)]
Merge "Ensure mac address added to iptables is always in unix format"

9 years agoUse os._exit after forking
Angus Lees [Fri, 15 May 2015 07:54:18 +0000 (17:54 +1000)]
Use os._exit after forking

As the docs point out(*), _exit should be used after a fork() to avoid
both processes flushing filehandles, calling destructors with side
effects, etc.  This change does just that.

(*) https://docs.python.org/2/library/os.html#os._exit

Change-Id: I68da6283c44ab8857baf217ac1443bd17988257d

9 years agotest_fork_error: Fix incorrect test mock
Angus Lees [Fri, 15 May 2015 07:50:33 +0000 (17:50 +1000)]
test_fork_error: Fix incorrect test mock

The previous os.fork mock returned a *function* that returned an OSError
object.  Oops.

Change-Id: I6e5dff930cf5614f7061efdfd8429963703cc214

9 years agoSkip external tables for neutron-db-manage --autogenerate
Henry Gessau [Mon, 25 May 2015 22:00:58 +0000 (18:00 -0400)]
Skip external tables for neutron-db-manage --autogenerate

DB tables that do not have models in the neutron tree cause
neutron-db-manage --autogenerate to create commands to drop the
tables. This fix hooks into alembic's environment with a include_object
callback that ignores external tables.

We already had a list of external tables for use by the migration tests,
so re-use them for --autogenerate.

Partial-bug: #1458682

Change-Id: I2c0bc73f72840c401c578e87d8178a79f05aad82

9 years agoMerge "Support for concurrent full-stack tests"
Jenkins [Mon, 25 May 2015 15:52:14 +0000 (15:52 +0000)]
Merge "Support for concurrent full-stack tests"

9 years agoFix a typo in _schedule_network method
Sergey Kolekonov [Mon, 25 May 2015 15:11:35 +0000 (18:11 +0300)]
Fix a typo in _schedule_network method

Fix the small typo which prevented from writing correct DHCP agent id to logs

Change-Id: Id8a872815f7cb2ba68ff1c674f17777da7858562

9 years agoAdd callback prior to deleting a subnet
John Schwarz [Thu, 16 Apr 2015 09:01:26 +0000 (12:01 +0300)]
Add callback prior to deleting a subnet

When using LBaaS and trying to delete a subnet, neutron has no way of
knowing if the subnet is associated to some pool. As a result, the
subnet is deleted but the pool remains associated to the (now
nonexistent) subnet_id.  This patch lays the ground-work for adding a
check in LBaaS' side to prevent such cases.

Related-Bug: #1413817
Change-Id: I3d5e231b67c72ffd919c92d65b57da56c63e053c

9 years agoOVS-agent: Separate ovs-ofctl using code as a driver
YAMAMOTO Takashi [Mon, 2 Mar 2015 04:14:48 +0000 (13:14 +0900)]
OVS-agent: Separate ovs-ofctl using code as a driver

This is a preparation to introduce another Ryu-based implementation.
The aim is to replace this with the new Ryu-based implementation
eventually.

Add a config option for OVS-agent which selects the implementation.
Currently, the only available choice is 'ovs-ofctl'.

Also, this commit simplifies DVR logics by reducing duplications
and makes some of DVR UTs actually check the flows rather than just
"add_flow is called".

Partially-Implements: blueprint ovs-ofctl-to-python
Change-Id: Ie1224f8a1c17268cd7d1c474ed82fdfb8852eaa8

9 years agoImported Translations from Transifex
OpenStack Proposal Bot [Mon, 25 May 2015 06:15:25 +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: If91cdcd85d6fad9b9d37aea367aa11c83ff4b343

9 years agoRemove unnecessary brackets
Gary Kotton [Mon, 25 May 2015 04:19:51 +0000 (21:19 -0700)]
Remove unnecessary brackets

TrivialFix

Change-Id: I9bd552110785c09b3eaa8762a8141446e51ea02a

9 years agoEnsure mac address added to iptables is always in unix format
Anand Shanmugam [Sat, 23 May 2015 08:22:23 +0000 (01:22 -0700)]
Ensure mac address added to iptables is always in unix format

When a allowed address pair entry is added with a mac format
other than unix format the ovs-vs agent keeps on restarting as
it is not able to save the proper iptables due to the error
"Error while processing VIF ports". This fix makes sure
that the mac address sent to the iptables firewall is always
in the unix format

Change-Id: I86bbf3cb2adf9b998190e472691c01d068ebab9c
Closes-Bug: #1457971

9 years agoMerge "ovs-agent: prevent ARP requests with faked IP addresses"
Jenkins [Sat, 23 May 2015 07:34:29 +0000 (07:34 +0000)]
Merge "ovs-agent: prevent ARP requests with faked IP addresses"

9 years agoMerge "Remove use of contextlib.nested"
Jenkins [Sat, 23 May 2015 05:34:57 +0000 (05:34 +0000)]
Merge "Remove use of contextlib.nested"

9 years agoMerge "IPAM reference driver"
Jenkins [Sat, 23 May 2015 03:35:38 +0000 (03:35 +0000)]
Merge "IPAM reference driver"

9 years agoMerge "Use namespace names in NetcatTester"
Jenkins [Sat, 23 May 2015 03:02:55 +0000 (03:02 +0000)]
Merge "Use namespace names in NetcatTester"