Fix pip install failure due to missing nvp.ini file
It looks like sdist does not support symlinks, therefore
letting nvp.ini point to nsx.ini is not a good solution.
Since nvp.ini is going away, leave a copy for now, but
add a warning so that users are aware of the switch,
whilst preserving full backward-compatibility.
This patch adds a new configuration variable for the timeout on
ovs-vsctl commands, and sets the default timeout to 10 seconds.
This is aimed at allowing users to tune the agents in order to avoid
timeout errors on their deployments.
Fix race condition on ml2 delete and update port methods
Synchronize access to ports table when deleting and updating
a port. Otherwise concurrent update/delete request for the same port
may cause neutron server to throw an exception and return
'500 Internal server error' for such requests.
When the rename of quantum->neutron occurred here ee3fe4e8 it also renamed
the the table creation from quantum_nvp_port_mapping to
neutron_nvp_port_mapping. This went undetected for a long time because
when neutron-server starts up it pushes down the scheme for tables that
are not there so the table would be created.
Because of this the following migration 50e86cb2637a called
op.rename_table('neutron_nvp_port_mapping', 'neutron_nsx_port_mappings')
though the table name being used was quantum_nvp_port_mapping. Because of this
the quantum_id->nvp_id mapping was never migrated over to the new table and
you would be left with a quantum_nvp_port_mapping table hanging around.
In addition, the downgrade would rename the table to neutron_nvp_port_mapping
instead of quantum_nvp_port_mapping. This patch addresses this issues.
Ann Kamyshnikova [Fri, 20 Sep 2013 11:48:37 +0000 (15:48 +0400)]
Update lockutils and fixture in openstack.common
lockutils: included commits: 8b2b0b7 Use hacking import_exceptions for gettextutils._ 6d0a6c3 Correct invalid docstrings 12bcdb7 Remove vim header 79e6bc6 fix lockutils.lock() to make it thread-safe ace5120 Add main() to lockutils that creates temp dir for locks 537d8e2 Allow lockutils to get lock_path conf from envvar 371fa42 Move LockFixture into a fixtures module d498c42 Fix to properly log when we release a semaphore 29d387c Add LockFixture to lockutils 3e3ac0c Modify lockutils.py due to dispose of eventlet 90b6a65 Fix locking bug 27d4b41 Move synchronized body to a first-class function 15c17fb Make lock_file_prefix optional 1a2df89 Enable H302 hacking check
fixture: created, included commits: 45658e2 Fix violations of H302:import only modules 12bcdb7 Remove vim header 3970d46 Fix typos in oslo 371fa42 Move LockFixture into a fixtures module f4a4855 Consolidate the use of stubs 6111131 Make openstack.common.fixture.config Py3 compliant 3906979 Add a fixture for dealing with config d332cca Add a fixture for dealing with mock patching. 1bc3ecf Start adding reusable test fixtures.
Also tox.ini was corrected to let lockutils work in tests.
This change is needed for work on bp: db-sync-models-with-migrations
Aaron Rosen [Wed, 8 Jan 2014 21:03:29 +0000 (13:03 -0800)]
Add test to port_security to test with security_groups
This patch adds a missing testcase to the port_security tests to test
for creating a port with port_security_enabled=False and passing in
a security group.
VMware NSX: Fix db integrity error on dhcp port operations
If the dhcp port and network disappear, ensure that
the integrity constraint violation that results from
inserting the neutron/nsx port mapping to the DB does
not propagate the exception all the way through, but
instead is caught and handled correctly.
Akihiro MOTOKI [Sat, 26 Oct 2013 12:53:21 +0000 (21:53 +0900)]
Remove plugin_name_v2 and extension_manager in test_config
There are two ways to specify a core plugin and an extension manager
in the unit tests: test_config and arguments of the constructor.
Both are used and it sometimes makes it a bit difficult to debug.
This patch removes the way via test_config and makes constructor
arguments the only way to do it.
Also removes the default entries in test_config because they are
not used anywhere.
Rename nicira configuration elements to match new naming structure
- Every config item prefixed with nvp is prefixed with nsx
- deprecation qualifiers are added to preserve bw compatibility
- nicira/nvp.ini is renamed to vmware/nsx.ini
- symlink nicira/nvp.ini is created to point to vmware/nsx.ini
- UT added to verify that nvp.ini and old config items can still
parsed correctly; bw-compat will be dropped in Juno
Eugene Nikanorov [Tue, 24 Dec 2013 11:08:22 +0000 (15:08 +0400)]
Fix race in get_network(s) in OVS plugin
Load network bindings eagerly with networks.
Otherwise a different db query could try to fetch network bindings
for already deleted networks. The issue is reproducible with
concurrent tempest network API tests.
nicira: fix db integrity error during port deletion
Due to the fact that plugin port operations are not
transactional (as they involve non synchronized DB
and Controller operations), concurrent (interleaved)
port requests may accidentally cause the insertion
of the mapping entry (neutron-port-id, nvp-port-id)
more than once. In case this occurs, it's safe to
expect the failure and continue the normal process
of the operation being requested.
Paul Michali [Tue, 24 Dec 2013 21:17:02 +0000 (16:17 -0500)]
Remove dupl. for get_resources in adv. services
There is duplication of logic related to creating API resources
for advanced services extensions. Extracted the common logic
out into a new module that can be used by the services.
There are already UT cases in the services that exercises
the logic, so no new tests were added.
Jay Pipes [Thu, 26 Dec 2013 21:04:19 +0000 (16:04 -0500)]
Start of new developer documentation
There is currently no useful developer-focused documentation in-tree
for Neutron. There are a smattering of useful documents on the
OpenStack wiki, however, there isn't a good organization to this
information, nor is there a condensed developer focus to a lot of it.
Some of the wiki pages are more proposals for features or bug fixes,
and there is a need for architecture, design, and code walk-through
documentation for Neutron to help with new (and existing) contribution.
This patch begins the process of adding developer documentation to Neutron.
It updates the main developer reference index.rst to pull in-line with what
Nova is doing, leaving some todo references for future patches. It also
adds a development.environment tutorial that is up-to-date with current
Neutron development, using tox/testr processes for running unit tests and
including a number of references to external wiki pages that have
instructions for using DevStack for OpenStack contribution/testing.
The next series of patches will add automodule documentation to the
developer reference for some of the major modules in Neutron.
Jay Pipes [Tue, 24 Dec 2013 01:58:31 +0000 (20:58 -0500)]
Corrects broken format strings in check_i18n.py
In tools/check_i18n.py, the error messages printed out
had format strings that included 5 interpolations, but only
four variables were supplied. This patch simply corrects that
mismatch by including the name of the predicate or checker
that failed.
Kevin Benton [Thu, 19 Dec 2013 03:52:20 +0000 (03:52 +0000)]
BigSwitch: Fixes floating IP backend updates
Changes BigSwitch plugin to correctly use
admin context on floating IP updates to the
backend controller so they correctly contain
floating IPs for all tenants.
Remove FWaaS Noop driver as default and move to unit tests dir
Remove the FWaaS Noop driver as the default and raise an exception
when the fwaas_driver.ini file has an enabled flag without any
associated driver. This communicates a misconfiguration clearly.
The Noop driver is moved to unit tests where it is used.
Also some cleanups in related area.
Maru Newby [Tue, 10 Dec 2013 16:10:42 +0000 (16:10 +0000)]
Send DHCP notifications regardless of agent status
The Neutron service, when under load, may not be able to process
agent heartbeats in a timely fashion. This can result in
agents being erroneously considered inactive. Previously, DHCP
notifications for which active agents could not be found were
silently dropped. This change ensures that notifications for
a given network are sent to agents even if those agents do not
appear to be active.
Additionally, if no enabled dhcp agents can be found for a given
network, an error will be logged. Raising an exception might be
preferable, but has such a large testing impact that it will be
submitted as a separate patch if deemed necessary.
Previous default for eswitch/daemon_endpoint would set a TCP port (5001)
which is in the range of the well known ports.
Change to unreserved port (60001) will avoid that conflict.
Dave Cahill [Tue, 17 Dec 2013 05:52:48 +0000 (05:52 +0000)]
Midonet plugin: Fix source NAT
Source NAT rule was being applied on the incorrect port.
It was being applied to the Neutron gateway port, not to
the MidoNet tenant / provider router link port.
This is a feature patch (2 of 3) that adds support for
Metadata services provided by the NSX (aka NVP) platform.
It also implements the handling of port events so that
dhcp and metadata configuration in NSX/NVP is updated
if port attributes such as fixed_ips and device_id are
updated.