Fix OVSBridge.get_port_ofport to handle empty output
Previously ovs_lib.OVSBridge.get_port_ofport() was not handling the
case where db_get_val() was returning None when no output was recieved
from ovs-vsctl. This patch ensures that the TypeError that results
from this condition is appropriately handled.
Henry Gessau [Tue, 1 Jul 2014 21:56:49 +0000 (17:56 -0400)]
Ignore variable column widths in ovsdb functional tests
The ovsdb tests check the output of "ovsdb-client monitor" before and after
some operations. The first line of output is a header row with spaces for
column separation. The column widths can vary depending on the data in the
columns, so compress multiple spaces to one for testing.
Kevin Benton [Tue, 1 Jul 2014 13:03:19 +0000 (06:03 -0700)]
BSN: Remove db lock and add missing contexts
Adds context tracking decorators that were missing
from router interface methods. Without them, new
sessions were being created instead of using the
existing context which was causing transaction
issues.
Modifies the servermanager to store context references
as weakrefs so if multiple functions are called before
the rest functions are called, the first one doesn't steal
the only context reference with a pop() call.
Removes a DB lock for update in the server manager that occured
during rest calls that was triggering deadlocks due to the
file lock synchronization for the rest calls.
Edgar Magana [Fri, 30 May 2014 23:27:35 +0000 (16:27 -0700)]
Stop the dhcp-agent process when dnsmasq version is not determined
When it is not possible to determinate the dnsmasq version
or dnsmasq is not installed, neutron shows only a warning message.
With this commit the dhcp-agent process will be stopped if the
dnsmasq service is not installed.
Modifies the dhcp version unit test with the expected SystemExit exception
Assaf Muller [Sat, 3 May 2014 14:05:04 +0000 (17:05 +0300)]
Replace occurences of 'test_tenant' with 'test-tenant' in tests
tenant_id will now be consistent among all resources created.
This is important when getting or listing resources by tenant_id.
Most resources are created under the 'test-tenant', while
metering and security groups were created under 'test_tenant'.
lb-agent: ensure removed devices get treated on resyncs
The previous exception handling in daemon_loop reprocessed all existing
devices as if they were new devices. However, it did not ensure that
any removed devices got cleaned up properly. This could result in
leftover security group iptables rules from deleted instances.
This patch refactors daemon_loop and scan_devices so devices that were
flagged for cleaning will get retreated in the next iteration if there
is an exception.
Terry Wilson [Wed, 25 Jun 2014 19:49:58 +0000 (14:49 -0500)]
Add sanity check for nova notification support
Since nova notification support adds a runtime dependency on
novaclient, add an external sanity check testing the system's
ability to import neutron.notifiers.nova
Vishal Agarwal [Wed, 25 Jun 2014 16:00:39 +0000 (21:30 +0530)]
Fix re-creation of the pool directory
Whenever vip is deleted the complete pool directory
is deleted, but since pool is still alive the get_stats
function recreates the directory. The fix prevents the
re-creation of the directory. Respective unit test case
is also modified
Manish Godara [Tue, 24 Jun 2014 17:23:59 +0000 (10:23 -0700)]
validate flat networks physical name
Modified flat driver to validate the physical network
name - we make sure that empty names are deducted.
unit test changes:
- added two tests to make sure that we detect empty
physnet names
- fix bug in existing unit-tests
-- flat_networks should be a list of string and not string
- use conf to setup flat_network
Kevin Benton [Thu, 19 Jun 2014 07:19:28 +0000 (00:19 -0700)]
Remove __init__ method from TunnelCallback mixin
Removed an __init__ method from a mixin class that
made mixing with other classes fragile and inflexible.
This replaces it with an explicit setup method.
This allows the ML2 RPCCallbacks class to correctly
inherit the common RpcCallback class.
Kevin Benton [Thu, 19 Jun 2014 05:34:00 +0000 (22:34 -0700)]
OVS agent: Correct bridge setup ordering
This patch fixes three issues that combined to break tunnel networks.
The first issue was the the failure mode was being set on the
integration bridge after the canary flow was installed. This
immediately wiped out the canary flow.
The second problem was that the main loop would sync tunnel networks
right before resetting the tunnel bridge when the canary flow was
missing. This meant that it would sync all of the tunnels via RPC and
then wipe them out.
The final issue was that after resetting the tunnel bridge in the
main loop, the tunnel_sync variable was not set to True, so the
tunnels would never be resynchronized.
This patch addresses the three issues in the following ways:
1. Set the failure mode on the bridge before the canary flow is
installed.
2. Run the OVS restart logic before the tunnel synchronization.
3. If the restart logic is triggered, set tunnel_sync to True to
trigger synchronization.
Ihar Hrachyshka [Mon, 23 Jun 2014 22:29:12 +0000 (00:29 +0200)]
Synced log module and its dependencies from olso-incubator
Old version of 'log' module depended on oslo-incubator RPC layer
implementation. This sync is intended to copy the following fix that
makes log module use oslo.messaging.notify.log_handler if available:
* 109e325e: Use oslo.messaging to publish log errors
Ihar Hrachyshka [Fri, 13 Jun 2014 20:25:13 +0000 (22:25 +0200)]
Updated neutron.conf to reflect new RPC options
After oslo.messaging port, some option became unavailable to set, some
of them changed description or default values. Make sure we don't leave
anything related to old RPC layer there.
New entries are generated by calling the following from inside
oslo-incubator:
YAMAMOTO Takashi [Fri, 20 Jun 2014 03:08:18 +0000 (12:08 +0900)]
ofagent: move main module from ryu repository
the recent oslo.messaging transition broke ofagent.
this commit fixes the regression.
historically the main module of ofagent has been maintained
in ryu's repository. this commit moves it into neutron's
repository and add common_config.init() call which is necesary
for the new rpc code.
Ralf Haferkamp [Wed, 18 Jun 2014 15:01:26 +0000 (17:01 +0200)]
Don't convert numeric protocol values to int
They are treated as strings everywhere. Converting them to int causes problems
when using postgresql as the database backend because it doesn't automatically
cast them back to integer.
berlin [Mon, 23 Jun 2014 02:16:34 +0000 (02:16 +0000)]
Revert "Check NVP router's status before deploying a service"
This reverts commit 25103df197c1f366eac8dd3069fabc01d3bd18e9.
Since it always leads to an gate failure filed on https://bugs.launchpad.net/neutron/+bug/1332502 although can't find the reason until now.