Rich Curran [Tue, 25 Mar 2014 14:56:46 +0000 (10:56 -0400)]
ML2 Cisco Nexus MD: Remove workaround for bug 1276395
Before bug 1276395 was merged the delete_port_postcommit() mechanism
drivers did not have access to the bound_segment information that was
in the process of being deleted.
Code was added to the cisco_nexus md to workaround this issue.
This code can now be removed.
Maru Newby [Wed, 26 Feb 2014 13:09:42 +0000 (13:09 +0000)]
Add script to migrate ovs or lb db to ml2 db
This script migrates an ovs or lb database to work with ml2.
The script's docstring provides details as to how it is intended to
work.
I've tested this manually on a trivial deployment, and would like
to add support for testing the migration with grenade. However,
that will have to wait until grenade support for neutron has
merged.
Akihiro Motoki [Fri, 21 Mar 2014 19:17:14 +0000 (04:17 +0900)]
NEC plugin: Remove a colon from binding:profile key due to XML problem
In XML specification, if a tag name contains a colon, a part before
a colon is interpreted as namespace. If key names in binding:profile
dict contains a colon, Neutron XML serializer sends them as-is.
A colon in key names should be used only if XML namespace are used.
NEC plugin uses a colon in key names and it leads to failures to XML
deserialization. To avoid this problem, this commit removes a colon
and prefix n key names in port binding:profile so that client XML
deserializer decodes XML response successfully.
Aaron Rosen [Fri, 21 Mar 2014 18:23:05 +0000 (11:23 -0700)]
rename ACTIVE_PENDING to ACTIVE_PENDING_STATUSES
Looking at the lbaas code it's not very obvious that constants.ACTIVE_PENDING
is a list of statuses that contain statuses that are ACTIVE or
PENDING. This patch renames ACTIVE_PENDING to ACTIVE_PENDING_STATUSES so
it's obvious that this is a list and not just a string called ACTIVE_PENDING.
Eugene Nikanorov [Thu, 20 Mar 2014 14:43:18 +0000 (18:43 +0400)]
Return meaningful error message on pool creation error
Instead of returning exception specific to haproxy (agent-based),
return more generic BackendNotFound exception.
It also could be used later when binding to devices will be
introduced. That exception will indicate scheduling failure, e.g.
inability to find appropriate backend for the resource.
Resource (pool) is then marked with ERROR state with corresponding
error description.
Kyle Mestery [Fri, 21 Mar 2014 09:41:31 +0000 (09:41 +0000)]
Don't set priority when calling mod_flow
This commit [1] changed the behavior of modifying flows to not allow priority
to be set on flow modification. The agent code which was calling mod_flow was
not updated to respect this behavior. The unit tests were also not updated in
this regard. I've corrected this behavior now, and added a negative UT case to
catch this in the future.
Kevin Benton [Thu, 20 Mar 2014 07:24:50 +0000 (00:24 -0700)]
Get rid of additional db contention on fetching VIP
This fix gets rid of fetching related record from ports table
that could potentially be blocked by concurrent operation
This is to prevent it from updating the
vip table while a port SQL lock is in place, which
vip entries have a reference to.
Robert Kukura [Mon, 10 Mar 2014 19:06:09 +0000 (15:06 -0400)]
ML2: Remove validate_port_binding() and unbind_port()
The API implemented by ML2 mechanism drivers included three methods
related to port binding that were called within DB transactions, but
that could potentially involve communication with controllers or
devices that should not be done within transactions. A subsequent
patch will move the calls to bind_port() outside of tranactions. This
patch eliminates the other two methods from the MechanismDriver API.
The validate_port_binding() method was previously called on the bound
mechanism driver to check whether an existing binding was still valid,
so that the port could be rebound if something changed. But since nova
has no way to handle changes to binding:vif_type or
binding:vif_details after a port is initially plugged, this turned out
not to be useful, so the method has been removed from the
MechanismDriver API. Now, once a port is successfully bound, the
binding remains until the port is deleted or any of it's
binding:host_id, binding:vnic_type, or binding:profile attribute
values are changed.
The unbind_port() method was previously called on the bound mechanism
driver as an existing binding was removed. This method was not used by
any existing mechanism drivers, and was redundant with the
update_port_precommit() and update_port_postcommit() methods that are
called on all mechanism drivers when an existing binding is removed,
so this method has also been removed from the driver API.
Eliminating the unbind_port() call allows the binding details to be
made available via the PortContext in delete_port_postcommit() calls,
completing the resolution of bug 1276395.
berlin [Mon, 17 Feb 2014 03:04:08 +0000 (11:04 +0800)]
Fix duplicate name of NVP LBaaS objs not allowed on vShield Edge
Duplicate name of LBaaS objs such as pool/vip/app_profile is not
allowed on vShield Edge, so here a name convention is needed to ensure
name uniqueness on the edge side.
Closes-Bug: #1257225
This patch adds a semaphore for serializing the delete port API
calls and update_port_status calls to avoid simultaneous
attempts to acquire SQL update locks on the port table from
the same thread pool.
This semaphore has been introduced to avoid undesired eventlet
yields which trigger 'lock wait timeout' errors in the DB backend;
it should have a negligible impact on the overall performance.
Ian Wienand [Wed, 12 Mar 2014 04:37:56 +0000 (15:37 +1100)]
Log dnsmasq host file generation
We've been seeing things that appear to be races between the hosts
files being written out for dnsmasq and dhcp requests coming in. We
will get occasional errors from dnsmasq saying "no address available",
"duplicate IP address" but by the time you look, the corresponding
host file has long since been replaced.
If we had some debugging like this, we could at least correlate what
neutron thought dnsmasq knew at the time the requests were coming in.
We store the filename to avoid multiple lookups, and also
s/name/filename/ to avoid ambiguity and be more consistent with the
rest of the code.